summaryrefslogtreecommitdiffstats
path: root/source3/smbd/server_exit.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-05-24 13:46:11 +0200
committerStefan Metzmacher <metze@samba.org>2012-05-24 20:07:20 +0200
commitb5e9ece1f3936d2221480169713042019e34a276 (patch)
tree5328a588f2d4b08281d3eb1f48ed9b351bf61eb5 /source3/smbd/server_exit.c
parent288a75d8dc4b17c92da22e0e04f622c593bd5df7 (diff)
downloadsamba-b5e9ece1f3936d2221480169713042019e34a276.tar.gz
samba-b5e9ece1f3936d2221480169713042019e34a276.tar.xz
samba-b5e9ece1f3936d2221480169713042019e34a276.zip
s3:smbd: remove global 'smbd_server_conn' !!!
For now we still use a global 'global_smbXsrv_connection' in order to pass the connection state to exit_server*(). metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu May 24 20:07:20 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd/server_exit.c')
-rw-r--r--source3/smbd/server_exit.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c
index 4e10a09a2b..20f7b4dbba 100644
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -85,7 +85,12 @@ static void exit_server_common(enum server_exit_reason how,
const char *const reason)
{
bool had_open_conn = false;
- struct smbd_server_connection *sconn = smbd_server_conn;
+ struct smbXsrv_connection *conn = global_smbXsrv_connection;
+ struct smbd_server_connection *sconn = NULL;
+
+ if (conn != NULL) {
+ sconn = conn->sconn;
+ }
if (!exit_firsttime)
exit(0);
@@ -158,7 +163,8 @@ static void exit_server_common(enum server_exit_reason how,
* because smbd_msg_ctx is not a talloc child of smbd_server_conn.
*/
sconn = NULL;
- TALLOC_FREE(smbd_server_conn);
+ conn = NULL;
+ TALLOC_FREE(global_smbXsrv_connection);
server_messaging_context_free();
server_event_context_free();
TALLOC_FREE(smbd_memcache_ctx);