From 4906d7fc679210555871bcb080e504fcc11734c6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 22 May 2009 22:30:09 +0200 Subject: Do queueing in wbclient.c The _trigger fn must know about wbc_context, while we were waiting in the queue the fd might have changed --- source3/lib/wb_reqtrans.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 038e5bda17..55883ba8c7 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -338,30 +338,6 @@ ssize_t wb_resp_write_recv(struct tevent_req *req, int *err) return state->ret; } -static bool closed_fd(int fd) -{ - struct timeval tv; - fd_set r_fds; - int selret; - - if (fd == -1) { - return true; - } - - FD_ZERO(&r_fds); - FD_SET(fd, &r_fds); - ZERO_STRUCT(tv); - - selret = select(fd+1, &r_fds, NULL, NULL, &tv); - if (selret == -1) { - return true; - } - if (selret == 0) { - return false; - } - return (FD_ISSET(fd, &r_fds)); -} - struct wb_simple_trans_state { struct tevent_context *ev; int fd; @@ -384,11 +360,6 @@ struct tevent_req *wb_simple_trans_send(TALLOC_CTX *mem_ctx, return NULL; } - if (closed_fd(fd)) { - tevent_req_error(req, EPIPE); - return tevent_req_post(req, ev); - } - wb_req->length = sizeof(struct winbindd_request); state->ev = ev; -- cgit