s3:smbd/server: avoid msg_ctx_to_sconn() in smbd_accept_connection()
authorStefan Metzmacher <metze@samba.org>
Tue, 13 Dec 2011 14:26:34 +0000 (15:26 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 14 Dec 2011 10:23:42 +0000 (11:23 +0100)
This is the place where we should create smbd_server_connection,
when we're ready to remove the global variable.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Dec 14 11:23:42 CET 2011 on sn-devel-104

source3/smbd/server.c

index 29456f2e8b99fff0e9afd55fa6c908a979c21551..f351b995018de95154dd79172d565662e5054acb 100644 (file)
@@ -399,7 +399,7 @@ static void smbd_accept_connection(struct tevent_context *ev,
        struct smbd_open_socket *s = talloc_get_type_abort(private_data,
                                     struct smbd_open_socket);
        struct messaging_context *msg_ctx = s->parent->msg_ctx;
-       struct smbd_server_connection *sconn = msg_ctx_to_sconn(msg_ctx);
+       struct smbd_server_connection *sconn = smbd_server_conn;
        struct sockaddr_storage addr;
        socklen_t in_addrlen = sizeof(addr);
        int fd;