Browse Source

Revert "Revert "Use more responsive functions faux_async_in_easy(), faux_async_out_easy()""

This reverts commit 70babdbc07a79a1e1d57f90d5b491286d5b62810.
Serj Kalichev 6 months ago
parent
commit
886849af07
3 changed files with 6 additions and 6 deletions
  1. 2 2
      klish/ktp/ktp.c
  2. 2 2
      klish/ktp/ktp_session.c
  3. 2 2
      klish/ktp/ktpd_session.c

+ 2 - 2
klish/ktp/ktp.c

@@ -130,7 +130,7 @@ bool_t ktp_peer_ev(faux_eloop_t *eloop, faux_eloop_type_e type,
 	// Write data
 	if (info->revents & POLLOUT) {
 		faux_eloop_exclude_fd_event(eloop, info->fd, POLLOUT);
-		if (faux_async_out(async) < 0) {
+		if (faux_async_out_easy(async) < 0) {
 			// Someting went wrong
 			faux_eloop_del_fd(eloop, info->fd);
 			syslog(LOG_ERR, "Problem with async output");
@@ -140,7 +140,7 @@ bool_t ktp_peer_ev(faux_eloop_t *eloop, faux_eloop_type_e type,
 
 	// Read data
 	if (info->revents & POLLIN) {
-		if (faux_async_in(async) < 0) {
+		if (faux_async_in_easy(async) < 0) {
 			// Someting went wrong
 			faux_eloop_del_fd(eloop, info->fd);
 			syslog(LOG_ERR, "Problem with async input");

+ 2 - 2
klish/ktp/ktp_session.c

@@ -259,7 +259,7 @@ static bool_t server_ev(faux_eloop_t *eloop, faux_eloop_type_e type,
 	// Write data
 	if (info->revents & POLLOUT) {
 		faux_eloop_exclude_fd_event(eloop, info->fd, POLLOUT);
-		if (faux_async_out(ktp->async) < 0) {
+		if (faux_async_out_easy(ktp->async) < 0) {
 			// Someting went wrong
 			faux_eloop_del_fd(eloop, info->fd);
 			syslog(LOG_ERR, "Problem with async output");
@@ -269,7 +269,7 @@ static bool_t server_ev(faux_eloop_t *eloop, faux_eloop_type_e type,
 
 	// Read data
 	if (info->revents & POLLIN) {
-		if (faux_async_in(ktp->async) < 0) {
+		if (faux_async_in_easy(ktp->async) < 0) {
 			// Someting went wrong
 			faux_eloop_del_fd(eloop, info->fd);
 			syslog(LOG_ERR, "Problem with async input");

+ 2 - 2
klish/ktp/ktpd_session.c

@@ -1415,7 +1415,7 @@ bool_t client_ev(faux_eloop_t *eloop, faux_eloop_type_e type,
 	// Write data
 	if (info->revents & POLLOUT) {
 		faux_eloop_exclude_fd_event(eloop, info->fd, POLLOUT);
-		if (faux_async_out(async) < 0) {
+		if (faux_async_out_easy(async) < 0) {
 			// Someting went wrong
 			faux_eloop_del_fd(eloop, info->fd);
 			syslog(LOG_ERR, "Can't send data to client");
@@ -1425,7 +1425,7 @@ bool_t client_ev(faux_eloop_t *eloop, faux_eloop_type_e type,
 
 	// Read data
 	if (info->revents & POLLIN) {
-		if (faux_async_in(async) < 0) {
+		if (faux_async_in_easy(async) < 0) {
 			// Someting went wrong
 			faux_eloop_del_fd(eloop, info->fd);
 			syslog(LOG_ERR, "Can't get data from client");