diff --git a/src/common/remoteio.c b/src/common/remoteio.c --- a/src/common/remoteio.c +++ b/src/common/remoteio.c @@ -18,9 +18,11 @@ */ -#include "libremoteio.h" -#include "execio.h" -#include "asprintf.h" +#include "common/config.h" + +#include "common/libremoteio.h" +#include "common/execio.h" +#include "common/asprintf.h" #include @@ -116,12 +118,12 @@ int remoteio_config(cfg_t *cfg, struct r multiio_event_handler_register(opts->multiio, opts->socket_type, - POLLWRNORM, + POLLOUT, (multiio_event_handler_func_t)&_remoteio_handle_write, opts); multiio_event_handler_register(opts->multiio, opts->socket_type, - POLLRDNORM, + POLLIN, (multiio_event_handler_func_t)&_remoteio_handle_read, opts); @@ -224,7 +226,7 @@ int remoteio_open_socket(struct remoteio rem = *remoteio; rem->sock = fd; - multiio_socket_add(opts->multiio, rem->sock, opts->socket_type, rem, POLLRDNORM); + multiio_socket_add(opts->multiio, rem->sock, opts->socket_type, rem, POLLIN); return 0; } @@ -281,7 +283,7 @@ int remoteio_open_server(struct remoteio * execio's multi-sockets by letting execio register itself with * multiio instead of us registering here perhaps */ - multiio_socket_add(opts->multiio, rem->sock, opts->socket_type, rem, POLLRDNORM); + multiio_socket_add(opts->multiio, rem->sock, opts->socket_type, rem, POLLIN); return 0; } @@ -371,10 +373,10 @@ int remoteio_write(struct remoteio *rem, if(q_empty(rem->outmsgs)) { pollfd.fd = rem->sock; - pollfd.revents = POLLWRNORM; + pollfd.revents = POLLOUT; pollfd.events = 0; poll(&pollfd, 1, 0); - if(pollfd.events & POLLWRNORM) + if(pollfd.events & POLLOUT) { bytes_written = write(rem->sock, buf, len); if(bytes_written > 0) @@ -411,7 +413,7 @@ int remoteio_write(struct remoteio *rem, memcpy(packet->data, buf, len); q_enqueue(rem->outmsgs, packet, 0); - multiio_socket_event_enable(rem->opts->multiio, rem->sock, POLLWRNORM); + multiio_socket_event_enable(rem->opts->multiio, rem->sock, POLLOUT); return 0; } @@ -435,7 +437,7 @@ int _remoteio_handle_write(multiio_conte */ if(q_empty(rem->outmsgs)) { - multiio_socket_event_disable(multiio, fd, POLLWRNORM); + multiio_socket_event_disable(multiio, fd, POLLOUT); return 0; } @@ -455,7 +457,7 @@ int _remoteio_handle_write(multiio_conte remoteio_packet_free(packet); if(q_empty(rem->outmsgs)) - multiio_socket_event_disable(multiio, fd, POLLWRNORM); + multiio_socket_event_disable(multiio, fd, POLLOUT); } else {