diff options
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/lsasd.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c index 9b59d1a21e..743d91569c 100644 --- a/source3/rpc_server/lsasd.c +++ b/source3/rpc_server/lsasd.c @@ -292,7 +292,6 @@ struct lsasd_children_data { struct pf_worker_data *pf; int listen_fd_size; int *listen_fds; - int lock_fd; bool listening; }; @@ -305,7 +304,6 @@ static int lsasd_children_main(struct tevent_context *ev_ctx, int child_id, int listen_fd_size, int *listen_fds, - int lock_fd, void *private_data) { struct lsasd_children_data *data; @@ -324,7 +322,6 @@ static int lsasd_children_main(struct tevent_context *ev_ctx, data->pf = pf; data->ev_ctx = ev_ctx; data->msg_ctx = msg_ctx; - data->lock_fd = lock_fd; data->listen_fd_size = listen_fd_size; data->listen_fds = listen_fds; data->listening = false; @@ -404,8 +401,7 @@ static void lsasd_next_client(void *pvt) data->ev_ctx, data->pf, data->listen_fd_size, - data->listen_fds, - data->lock_fd); + data->listen_fds); if (!req) { DEBUG(1, ("Failed to make listening request!?\n")); talloc_free(next); @@ -446,19 +442,9 @@ static void lsasd_handle_client(struct tevent_req *req) /* we are done listening */ data->listening = false; - if (rc > 0) { - DEBUG(1, ("Failed to accept client connection!\n")); - /* bail out if we are not serving any other client */ - if (data->pf->num_clients == 0) { - data->pf->status = PF_WORKER_EXITING; - } - return; - } - - if (rc == -2) { - DEBUG(1, ("Server asks us to die!\n")); - data->pf->status = PF_WORKER_EXITING; - return; + if (rc != 0) { + DEBUG(6, ("No client connection was available after all!\n")); + goto done; } DEBUG(2, ("LSASD preforked child %d got client connection!\n", @@ -511,6 +497,7 @@ static void lsasd_handle_client(struct tevent_req *req) DEBUG(0, ("ERROR: Unsupported socket!\n")); } +done: talloc_free(tmp_ctx); } |