diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-12-13 14:58:50 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-12-14 08:14:44 +0100 |
commit | 6d15ca3482bfdccd9eceef1874f88ec351e3f43f (patch) | |
tree | a2ada4138ffb9b862e84c8f2962b10a532825c64 /source3/smbd/server.c | |
parent | 010d6003e323e57de16ec1f5b1c86bc5ed4bec95 (diff) | |
download | samba-6d15ca3482bfdccd9eceef1874f88ec351e3f43f.tar.gz samba-6d15ca3482bfdccd9eceef1874f88ec351e3f43f.tar.bz2 samba-6d15ca3482bfdccd9eceef1874f88ec351e3f43f.zip |
s3:smbd/globals: change 'int am_parent' into 'struct smbd_parent_context *am_parent'
This is a short term solution on the way to get rid of 'am_parent' completely.
metze
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 7cd1b83326..779bbba1fa 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -416,7 +416,14 @@ static void smbd_accept_connection(struct tevent_context *ev, NTSTATUS status = NT_STATUS_OK; /* Child code ... */ - am_parent = 0; + am_parent = NULL; + + /* + * Can't use TALLOC_FREE here. Nulling out the argument to it + * would overwrite memory we've just freed. + */ + talloc_free(s->parent); + s = NULL; set_my_unique_id(unique_id); @@ -430,13 +437,6 @@ static void smbd_accept_connection(struct tevent_context *ev, close_low_fds(False); /* Don't close stderr */ } - /* - * Can't use TALLOC_FREE here. Nulling out the argument to it - * would overwrite memory we've just freed. - */ - talloc_free(s->parent); - s = NULL; - status = reinit_after_fork(msg_ctx, ev, true); @@ -1146,6 +1146,7 @@ extern void build_options(bool screen); parent->interactive = interactive; parent->ev_ctx = ev_ctx; parent->msg_ctx = msg_ctx; + am_parent = parent; se = tevent_add_signal(parent->ev_ctx, parent, |