From 0421fa90ce2f140da95e51216677834896d77213 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 12 Feb 2009 12:12:04 +0100 Subject: Keep the forked-smbd stdout reader around longer --- source3/rpc_client/rpc_transport_smbd.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/rpc_client/rpc_transport_smbd.c b/source3/rpc_client/rpc_transport_smbd.c index d8ab96f7b2..eb64a34d97 100644 --- a/source3/rpc_client/rpc_transport_smbd.c +++ b/source3/rpc_client/rpc_transport_smbd.c @@ -334,7 +334,7 @@ struct async_req *rpc_cli_smbd_conn_init_send(TALLOC_CTX *mem_ctx, goto nomem; } - if (event_add_fd(ev, subreq, state->conn->stdout_fd, EVENT_FD_READ, + if (event_add_fd(ev, state, state->conn->stdout_fd, EVENT_FD_READ, rpc_cli_smbd_stdout_reader, state->conn) == NULL) { goto nomem; } @@ -458,7 +458,7 @@ static struct tevent_req *rpc_smbd_write_send(TALLOC_CTX *mem_ctx, goto fail; } - if (event_add_fd(ev, subreq, transp->conn->stdout_fd, EVENT_FD_READ, + if (event_add_fd(ev, state, transp->conn->stdout_fd, EVENT_FD_READ, rpc_cli_smbd_stdout_reader, transp->conn) == NULL) { goto fail; } @@ -529,7 +529,7 @@ static struct tevent_req *rpc_smbd_read_send(TALLOC_CTX *mem_ctx, goto fail; } - if (event_add_fd(ev, subreq, transp->conn->stdout_fd, EVENT_FD_READ, + if (event_add_fd(ev, state, transp->conn->stdout_fd, EVENT_FD_READ, rpc_cli_smbd_stdout_reader, transp->conn) == NULL) { goto fail; } @@ -602,6 +602,11 @@ struct async_req *rpc_transport_smbd_init_send(TALLOC_CTX *mem_ctx, state->transport_smbd->conn = conn; state->transport->priv = state->transport_smbd; + if (event_add_fd(ev, state, conn->stdout_fd, EVENT_FD_READ, + rpc_cli_smbd_stdout_reader, conn) == NULL) { + goto fail; + } + subreq = rpc_transport_np_init_send(state, ev, conn->cli, abstract_syntax); if (subreq == NULL) { -- cgit