return -1;
if( (ev->ev_events&(EV_READ|EV_WRITE)) && ev->ev_fd != -1) {
ev->ev_base->fds[ev->ev_fd] = ev;
- if(ev->ev_events&EV_READ) {
+ if((ev->ev_events&EV_READ)) {
FD_SET(FD_SET_T ev->ev_fd, &ev->ev_base->reads);
}
- if(ev->ev_events&EV_WRITE) {
+ if((ev->ev_events&EV_WRITE)) {
FD_SET(FD_SET_T ev->ev_fd, &ev->ev_base->writes);
}
FD_SET(FD_SET_T ev->ev_fd, &ev->ev_base->content);
}
#endif
- if(event&UB_EV_TIMEOUT) {
+ if((event&UB_EV_TIMEOUT)) {
verbose(VERB_QUERY, "tcp took too long, dropped");
reclaim_tcp_handler(c);
if(!c->tcp_do_close) {
}
return;
}
- if(event&UB_EV_READ
+ if((event&UB_EV_READ)
#ifdef USE_MSG_FASTOPEN
&& !(c->tcp_do_fastopen && (event&UB_EV_WRITE))
#endif
tcp_more_read_again(fd, c);
return;
}
- if(event&UB_EV_WRITE) {
+ if((event&UB_EV_WRITE)) {
int has_tcpq = (c->tcp_req_info != NULL);
int* morewrite = c->tcp_more_write_again;
if(!comm_point_tcp_handle_write(fd, c)) {
log_assert(c->type == comm_http);
ub_comm_base_now(c->ev->base);
- if(event&UB_EV_TIMEOUT) {
+ if((event&UB_EV_TIMEOUT)) {
verbose(VERB_QUERY, "http took too long, dropped");
reclaim_http_handler(c);
if(!c->tcp_do_close) {
}
return;
}
- if(event&UB_EV_READ) {
+ if((event&UB_EV_READ)) {
if(!comm_point_http_handle_read(fd, c)) {
reclaim_http_handler(c);
if(!c->tcp_do_close) {
}
return;
}
- if(event&UB_EV_WRITE) {
+ if((event&UB_EV_WRITE)) {
if(!comm_point_http_handle_write(fd, c)) {
reclaim_http_handler(c);
if(!c->tcp_do_close) {
log_assert(c->type == comm_local);
ub_comm_base_now(c->ev->base);
- if(event&UB_EV_READ) {
+ if((event&UB_EV_READ)) {
if(!comm_point_tcp_handle_read(fd, c, 1)) {
fptr_ok(fptr_whitelist_comm_point(c->callback));
(void)(*c->callback)(c, c->cb_arg, NETEVENT_CLOSED,
log_assert(c->type == comm_raw);
ub_comm_base_now(c->ev->base);
- if(event&UB_EV_TIMEOUT)
+ if((event&UB_EV_TIMEOUT))
err = NETEVENT_TIMEOUT;
fptr_ok(fptr_whitelist_comm_point_raw(c->callback));
(void)(*c->callback)(c, c->cb_arg, err, NULL);