static bool cldap_recvfrom_setup(struct cldap_socket *c) { struct tevent_context *ev; if (c->recv_subreq) { return true; } if (!c->searches.list && !c->incoming.handler) { return true; } ev = c->incoming.ev; if (ev == NULL) { ev = c->searches.list->caller.ev; } c->recv_subreq = tdgram_recvfrom_send(c, ev, c->sock); if (!c->recv_subreq) { return false; } tevent_req_set_callback(c->recv_subreq, cldap_recvfrom_done, c); return true; }
static bool cldap_recvfrom_setup(struct cldap_socket *c) { if (c->recv_subreq) { return true; } if (!c->searches.list && !c->incoming.handler) { return true; } c->recv_subreq = tdgram_recvfrom_send(c, c->event.ctx, c->sock); if (!c->recv_subreq) { return false; } tevent_req_set_callback(c->recv_subreq, cldap_recvfrom_done, c); return true; }