Loading docs/examples/ephiperfifo.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -207,8 +207,8 @@ static void event_cb(GlobalInfo *g, int fd, int revents) CURLMcode rc; CURLMcode rc; struct itimerspec its; struct itimerspec its; int action = (revents & EPOLLIN ? CURL_CSELECT_IN : 0) | int action = ((revents & EPOLLIN) ? CURL_CSELECT_IN : 0) | (revents & EPOLLOUT ? CURL_CSELECT_OUT : 0); ((revents & EPOLLOUT) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); mcode_or_die("event_cb: curl_multi_socket_action", rc); Loading Loading @@ -273,8 +273,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) GlobalInfo *g) { { struct epoll_event ev; struct epoll_event ev; int kind = (act & CURL_POLL_IN ? EPOLLIN : 0) | int kind = ((act & CURL_POLL_IN) ? EPOLLIN : 0) | (act & CURL_POLL_OUT ? EPOLLOUT : 0); ((act & CURL_POLL_OUT) ? EPOLLOUT : 0); if(f->sockfd) { if(f->sockfd) { if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) Loading docs/examples/evhiperfifo.c +4 −3 Original line number Original line Diff line number Diff line Loading @@ -203,8 +203,8 @@ static void event_cb(EV_P_ struct ev_io *w, int revents) GlobalInfo *g = (GlobalInfo*) w->data; GlobalInfo *g = (GlobalInfo*) w->data; CURLMcode rc; CURLMcode rc; int action = (revents&EV_READ?CURL_POLL_IN:0)| int action = ((revents & EV_READ) ? CURL_POLL_IN : 0) | (revents&EV_WRITE?CURL_POLL_OUT:0); ((revents & EV_WRITE) ? CURL_POLL_OUT : 0); rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running); rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); mcode_or_die("event_cb: curl_multi_socket_action", rc); check_multi_info(g); check_multi_info(g); Loading Loading @@ -247,7 +247,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, { { printf("%s \n", __PRETTY_FUNCTION__); printf("%s \n", __PRETTY_FUNCTION__); int kind = (act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0); int kind = ((act & CURL_POLL_IN) ? EV_READ : 0) | ((act & CURL_POLL_OUT) ? EV_WRITE : 0); f->sockfd = s; f->sockfd = s; f->action = act; f->action = act; Loading docs/examples/ghiper.c +6 −5 Original line number Original line Diff line number Diff line Loading @@ -182,8 +182,8 @@ static gboolean event_cb(GIOChannel *ch, GIOCondition condition, gpointer data) int fd = g_io_channel_unix_get_fd(ch); int fd = g_io_channel_unix_get_fd(ch); int action = int action = (condition & G_IO_IN ? CURL_CSELECT_IN : 0) | ((condition & G_IO_IN) ? CURL_CSELECT_IN : 0) | (condition & G_IO_OUT ? CURL_CSELECT_OUT : 0); ((condition & G_IO_OUT) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); mcode_or_die("event_cb: curl_multi_socket_action", rc); Loading Loading @@ -218,7 +218,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) GlobalInfo *g) { { GIOCondition kind = GIOCondition kind = (act&CURL_POLL_IN?G_IO_IN:0)|(act&CURL_POLL_OUT?G_IO_OUT:0); ((act & CURL_POLL_IN) ? G_IO_IN : 0) | ((act & CURL_POLL_OUT) ? G_IO_OUT : 0); f->sockfd = s; f->sockfd = s; f->action = act; f->action = act; Loading Loading @@ -255,8 +256,8 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) else { else { if(!fdp) { if(!fdp) { MSG_OUT("Adding data: %s%s\n", MSG_OUT("Adding data: %s%s\n", what&CURL_POLL_IN?"READ":"", (what & CURL_POLL_IN) ? "READ" : "", what&CURL_POLL_OUT?"WRITE":""); (what & CURL_POLL_OUT) ? "WRITE" : ""); addsock(s, e, what, g); addsock(s, e, what, g); } } else { else { Loading docs/examples/hiperfifo.c +4 −3 Original line number Original line Diff line number Diff line Loading @@ -202,8 +202,8 @@ static void event_cb(int fd, short kind, void *userp) CURLMcode rc; CURLMcode rc; int action = int action = (kind & EV_READ ? CURL_CSELECT_IN : 0) | ((kind & EV_READ) ? CURL_CSELECT_IN : 0) | (kind & EV_WRITE ? CURL_CSELECT_OUT : 0); ((kind & EV_WRITE) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); mcode_or_die("event_cb: curl_multi_socket_action", rc); Loading Loading @@ -249,7 +249,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) GlobalInfo *g) { { int kind = int kind = (act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0)|EV_PERSIST; ((act & CURL_POLL_IN) ? EV_READ : 0) | ((act & CURL_POLL_OUT) ? EV_WRITE : 0) | EV_PERSIST; f->sockfd = s; f->sockfd = s; f->action = act; f->action = act; Loading Loading
docs/examples/ephiperfifo.c +4 −4 Original line number Original line Diff line number Diff line Loading @@ -207,8 +207,8 @@ static void event_cb(GlobalInfo *g, int fd, int revents) CURLMcode rc; CURLMcode rc; struct itimerspec its; struct itimerspec its; int action = (revents & EPOLLIN ? CURL_CSELECT_IN : 0) | int action = ((revents & EPOLLIN) ? CURL_CSELECT_IN : 0) | (revents & EPOLLOUT ? CURL_CSELECT_OUT : 0); ((revents & EPOLLOUT) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); mcode_or_die("event_cb: curl_multi_socket_action", rc); Loading Loading @@ -273,8 +273,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) GlobalInfo *g) { { struct epoll_event ev; struct epoll_event ev; int kind = (act & CURL_POLL_IN ? EPOLLIN : 0) | int kind = ((act & CURL_POLL_IN) ? EPOLLIN : 0) | (act & CURL_POLL_OUT ? EPOLLOUT : 0); ((act & CURL_POLL_OUT) ? EPOLLOUT : 0); if(f->sockfd) { if(f->sockfd) { if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL)) Loading
docs/examples/evhiperfifo.c +4 −3 Original line number Original line Diff line number Diff line Loading @@ -203,8 +203,8 @@ static void event_cb(EV_P_ struct ev_io *w, int revents) GlobalInfo *g = (GlobalInfo*) w->data; GlobalInfo *g = (GlobalInfo*) w->data; CURLMcode rc; CURLMcode rc; int action = (revents&EV_READ?CURL_POLL_IN:0)| int action = ((revents & EV_READ) ? CURL_POLL_IN : 0) | (revents&EV_WRITE?CURL_POLL_OUT:0); ((revents & EV_WRITE) ? CURL_POLL_OUT : 0); rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running); rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); mcode_or_die("event_cb: curl_multi_socket_action", rc); check_multi_info(g); check_multi_info(g); Loading Loading @@ -247,7 +247,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, { { printf("%s \n", __PRETTY_FUNCTION__); printf("%s \n", __PRETTY_FUNCTION__); int kind = (act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0); int kind = ((act & CURL_POLL_IN) ? EV_READ : 0) | ((act & CURL_POLL_OUT) ? EV_WRITE : 0); f->sockfd = s; f->sockfd = s; f->action = act; f->action = act; Loading
docs/examples/ghiper.c +6 −5 Original line number Original line Diff line number Diff line Loading @@ -182,8 +182,8 @@ static gboolean event_cb(GIOChannel *ch, GIOCondition condition, gpointer data) int fd = g_io_channel_unix_get_fd(ch); int fd = g_io_channel_unix_get_fd(ch); int action = int action = (condition & G_IO_IN ? CURL_CSELECT_IN : 0) | ((condition & G_IO_IN) ? CURL_CSELECT_IN : 0) | (condition & G_IO_OUT ? CURL_CSELECT_OUT : 0); ((condition & G_IO_OUT) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); mcode_or_die("event_cb: curl_multi_socket_action", rc); Loading Loading @@ -218,7 +218,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) GlobalInfo *g) { { GIOCondition kind = GIOCondition kind = (act&CURL_POLL_IN?G_IO_IN:0)|(act&CURL_POLL_OUT?G_IO_OUT:0); ((act & CURL_POLL_IN) ? G_IO_IN : 0) | ((act & CURL_POLL_OUT) ? G_IO_OUT : 0); f->sockfd = s; f->sockfd = s; f->action = act; f->action = act; Loading Loading @@ -255,8 +256,8 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp) else { else { if(!fdp) { if(!fdp) { MSG_OUT("Adding data: %s%s\n", MSG_OUT("Adding data: %s%s\n", what&CURL_POLL_IN?"READ":"", (what & CURL_POLL_IN) ? "READ" : "", what&CURL_POLL_OUT?"WRITE":""); (what & CURL_POLL_OUT) ? "WRITE" : ""); addsock(s, e, what, g); addsock(s, e, what, g); } } else { else { Loading
docs/examples/hiperfifo.c +4 −3 Original line number Original line Diff line number Diff line Loading @@ -202,8 +202,8 @@ static void event_cb(int fd, short kind, void *userp) CURLMcode rc; CURLMcode rc; int action = int action = (kind & EV_READ ? CURL_CSELECT_IN : 0) | ((kind & EV_READ) ? CURL_CSELECT_IN : 0) | (kind & EV_WRITE ? CURL_CSELECT_OUT : 0); ((kind & EV_WRITE) ? CURL_CSELECT_OUT : 0); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running); mcode_or_die("event_cb: curl_multi_socket_action", rc); mcode_or_die("event_cb: curl_multi_socket_action", rc); Loading Loading @@ -249,7 +249,8 @@ static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act, GlobalInfo *g) GlobalInfo *g) { { int kind = int kind = (act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0)|EV_PERSIST; ((act & CURL_POLL_IN) ? EV_READ : 0) | ((act & CURL_POLL_OUT) ? EV_WRITE : 0) | EV_PERSIST; f->sockfd = s; f->sockfd = s; f->action = act; f->action = act; Loading