[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Sat Aug 7 06:37:21 MDT 2010


The branch, master has been updated
       via  72fd7fb... s3: Remove some references to smbd_messaging_context()
      from  390bfed... s4:kcc_connection.c - fix typo in error message

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 72fd7fb49dac33bf4fd91bf1d8795f62b5a9fb82
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Aug 7 13:23:07 2010 +0200

    s3: Remove some references to smbd_messaging_context()

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

Summary of changes:
 source3/smbd/process.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index b867ba1..d8ed563 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2435,7 +2435,8 @@ static bool keepalive_fn(const struct timeval *now, void *private_data)
  */
 static bool deadtime_fn(const struct timeval *now, void *private_data)
 {
-	struct smbd_server_connection *sconn = smbd_server_conn;
+	struct smbd_server_connection *sconn =
+		(struct smbd_server_connection *)private_data;
 
 	if (sconn->using_smb2) {
 		/* TODO: implement real idle check */
@@ -2443,7 +2444,7 @@ static bool deadtime_fn(const struct timeval *now, void *private_data)
 			return true;
 		}
 		DEBUG( 2, ( "Closing idle SMB2 connection\n" ) );
-		messaging_send(smbd_messaging_context(), procid_self(),
+		messaging_send(sconn->msg_ctx, procid_self(),
 			       MSG_SHUTDOWN, &data_blob_null);
 		return false;
 	}
@@ -2451,7 +2452,7 @@ static bool deadtime_fn(const struct timeval *now, void *private_data)
 	if ((conn_num_open(sconn) == 0)
 	    || (conn_idle_all(sconn, now->tv_sec))) {
 		DEBUG( 2, ( "Closing idle SMB1 connection\n" ) );
-		messaging_send(smbd_messaging_context(), procid_self(),
+		messaging_send(sconn->msg_ctx, procid_self(),
 			       MSG_SHUTDOWN, &data_blob_null);
 		return False;
 	}
@@ -2807,7 +2808,7 @@ static bool fork_echo_handler(struct smbd_server_connection *sconn)
 
 		close(listener_pipe[0]);
 
-		status = reinit_after_fork(smbd_messaging_context(),
+		status = reinit_after_fork(sconn->msg_ctx,
 					   smbd_event_context(),
 					   procid_self(), false);
 		if (!NT_STATUS_IS_OK(status)) {
@@ -3036,7 +3037,7 @@ void smbd_process(void)
 
 	if (!(event_add_idle(smbd_event_context(), NULL,
 			     timeval_set(IDLE_CLOSED_TIMEOUT, 0),
-			     "deadtime", deadtime_fn, NULL))) {
+			     "deadtime", deadtime_fn, smbd_server_conn))) {
 		DEBUG(0, ("Could not add deadtime event\n"));
 		exit(1);
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list