[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-648-geae6245

Volker Lendecke vlendec at samba.org
Sun Apr 5 11:53:54 GMT 2009


The branch, v3-4-test has been updated
       via  eae62459dc6fd0041a4f69601be5354f06022268 (commit)
       via  37d754a34709fbcc5f9adcd2e3a4e5e5862c1a7a (commit)
       via  06d4fc56867810e66f73d3645aad25d528a7f751 (commit)
      from  96943dd9ce1b1c954bffd498989283a500b4ee9d (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit eae62459dc6fd0041a4f69601be5354f06022268
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Feb 12 12:12:04 2009 +0100

    Keep the forked-smbd stdout reader around longer

commit 37d754a34709fbcc5f9adcd2e3a4e5e5862c1a7a
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Feb 12 12:11:16 2009 +0100

    Ensure 0-termination for the forked-smbd debug output

commit 06d4fc56867810e66f73d3645aad25d528a7f751
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Feb 12 20:41:49 2009 +0100

    Pass the current debuglevel down to the forked smbd

-----------------------------------------------------------------------

Summary of changes:
 source3/rpc_client/rpc_transport_smbd.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_client/rpc_transport_smbd.c b/source3/rpc_client/rpc_transport_smbd.c
index bf4aa65..823f216 100644
--- a/source3/rpc_client/rpc_transport_smbd.c
+++ b/source3/rpc_client/rpc_transport_smbd.c
@@ -88,6 +88,7 @@ static void rpc_cli_smbd_stdout_reader(struct event_context *ev,
 		TALLOC_FREE(fde);
 		return;
 	}
+	buf[nread] = '\0';
 
 	if (conn->stdout_callback.fn != NULL) {
 		conn->stdout_callback.fn(buf, nread,
@@ -309,7 +310,8 @@ struct async_req *rpc_cli_smbd_conn_init_send(TALLOC_CTX *mem_ctx,
 			printf("no memory");
 			exit(1);
 		}
-		if (asprintf(&smbd_cmd, "%s -F -S", smbd_cmd) == -1) {
+		if (asprintf(&smbd_cmd, "%s -F -S -d %d", smbd_cmd,
+			     DEBUGLEVEL) == -1) {
 			printf("no memory");
 			exit(1);
 		}
@@ -332,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;
 	}
@@ -456,7 +458,7 @@ static struct async_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 +531,7 @@ static struct async_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;
 	}
@@ -605,6 +607,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) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list