summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-12-13 08:54:49 +0100
committerStefan Metzmacher <metze@samba.org>2011-12-13 12:36:35 +0100
commit1738a61b846e39c6a09b16ca01a40f9890c16991 (patch)
tree1cc3a3bddbd71a002e27d05112ebc844c0af88d5
parentdc38db31ba3166148e41f7551b5160cc761f93f2 (diff)
downloadsamba-1738a61b846e39c6a09b16ca01a40f9890c16991.tar.gz
samba-1738a61b846e39c6a09b16ca01a40f9890c16991.tar.bz2
samba-1738a61b846e39c6a09b16ca01a40f9890c16991.zip
s3:smbd/server: create smbd_parent_context earlier
metze
-rw-r--r--source3/smbd/server.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 7bb846a03d..7985efc895 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1126,6 +1126,14 @@ extern void build_options(bool screen);
smbd_server_conn->msg_ctx = msg_ctx;
+ parent = talloc_zero(ev_ctx, struct smbd_parent_context);
+ if (!parent) {
+ exit_server("talloc(struct smbd_parent_context) failed");
+ }
+ parent->interactive = interactive;
+ parent->ev_ctx = ev_ctx;
+ parent->msg_ctx = msg_ctx;
+
smbd_setup_sig_term_handler();
smbd_setup_sig_hup_handler(ev_ctx,
msg_ctx);
@@ -1284,13 +1292,6 @@ extern void build_options(bool screen);
return(0);
}
- parent = talloc_zero(ev_ctx, struct smbd_parent_context);
- if (!parent) {
- exit_server("talloc(struct smbd_parent_context) failed");
- }
- parent->interactive = interactive;
- parent->ev_ctx = ev_ctx;
- parent->msg_ctx = msg_ctx;
if (!open_sockets_smbd(parent, ev_ctx, msg_ctx, ports))
exit_server("open_sockets_smbd() failed");