diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/events.c | 6 | ||||
-rw-r--r-- | source3/lib/netapi/cm.c | 28 | ||||
-rw-r--r-- | source3/lib/wb_reqtrans.c | 5 |
3 files changed, 22 insertions, 17 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c index f875e0dc0c..8c56941829 100644 --- a/source3/lib/events.c +++ b/source3/lib/events.c @@ -145,7 +145,7 @@ struct timeval *get_timed_events_timeout(struct tevent_context *ev, return to_ret; } -static int s3_event_loop_once(struct tevent_context *ev) +static int s3_event_loop_once(struct tevent_context *ev, const char *location) { struct timeval now, to; fd_set r_fds, w_fds; @@ -181,12 +181,12 @@ static int s3_event_loop_once(struct tevent_context *ev) return 0; } -static int s3_event_loop_wait(struct tevent_context *ev) +static int s3_event_loop_wait(struct tevent_context *ev, const char *location) { int ret = 0; while (ret == 0) { - ret = s3_event_loop_once(ev); + ret = s3_event_loop_once(ev, location); } return ret; diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index 233255fed4..43ebed6c22 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -73,19 +73,10 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx, /******************************************************************** ********************************************************************/ -WERROR libnetapi_shutdown_cm(struct libnetapi_ctx *ctx) -{ - cli_cm_shutdown(); - - return WERR_OK; -} - -/******************************************************************** -********************************************************************/ - struct client_pipe_connection { struct client_pipe_connection *prev, *next; struct rpc_pipe_client *pipe; + struct cli_state *cli; }; static struct client_pipe_connection *pipe_connections; @@ -93,6 +84,20 @@ static struct client_pipe_connection *pipe_connections; /******************************************************************** ********************************************************************/ +WERROR libnetapi_shutdown_cm(struct libnetapi_ctx *ctx) +{ + struct client_pipe_connection *p; + + for (p = pipe_connections; p; p = p->next) { + cli_shutdown(p->cli); + } + + return WERR_OK; +} + +/******************************************************************** +********************************************************************/ + static NTSTATUS pipe_cm_find(struct cli_state *cli, const struct ndr_syntax_id *interface, struct rpc_pipe_client **presult) @@ -138,6 +143,7 @@ static NTSTATUS pipe_cm_connect(TALLOC_CTX *mem_ctx, return status; } + p->cli = cli; DLIST_ADD(pipe_connections, p); *presult = p->pipe; @@ -193,5 +199,3 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx, return WERR_OK; } - - diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 6ae1d1bb9b..e1c67491c0 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -372,7 +372,8 @@ struct resp_write_state { static void wb_resp_write_done(struct tevent_req *subreq); struct tevent_req *wb_resp_write_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, int fd, + struct tevent_context *ev, + struct tevent_queue *queue, int fd, struct winbindd_response *wb_resp) { struct tevent_req *result, *subreq; @@ -394,7 +395,7 @@ struct tevent_req *wb_resp_write_send(TALLOC_CTX *mem_ctx, count = 2; } - subreq = writev_send(state, ev, NULL, fd, state->iov, count); + subreq = writev_send(state, ev, queue, fd, state->iov, count); if (subreq == NULL) { goto fail; } |