summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-01-14 21:46:37 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-01-14 22:33:13 +0100
commitfef1174ba87b6548f93d788c32360bd192b7c7f2 (patch)
tree8c5f9655d3940d8122987461b4923495abfd4187
parenta87b2f9ec0b57fe56d14309e4b94e30e10b27f04 (diff)
downloadsamba-fef1174ba87b6548f93d788c32360bd192b7c7f2.tar.gz
samba-fef1174ba87b6548f93d788c32360bd192b7c7f2.tar.bz2
samba-fef1174ba87b6548f93d788c32360bd192b7c7f2.zip
s4:web_server - immeditately assign "wdata" as private data for the stream socket
This fixes bug #7887. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Fri Jan 14 22:33:13 CET 2011 on sn-devel-104
-rw-r--r--source4/web_server/web_server.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index 9531115e88..8e8168511f 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -305,6 +305,11 @@ static void websrv_task_init(struct task_server *task)
model_ops = process_model_startup("single");
if (!model_ops) goto failed;
+ /* startup the Python processor - unfortunately we can't do this
+ per connection as that wouldn't allow for session variables */
+ wdata = talloc_zero(task, struct web_server_data);
+ if (wdata == NULL) goto failed;
+
if (lpcfg_interfaces(task->lp_ctx) && lpcfg_bind_interfaces_only(task->lp_ctx)) {
int num_interfaces;
int i;
@@ -321,25 +326,20 @@ static void websrv_task_init(struct task_server *task)
&web_stream_ops,
"ipv4", address,
&port, lpcfg_socket_options(task->lp_ctx),
- task);
+ wdata);
if (!NT_STATUS_IS_OK(status)) goto failed;
}
talloc_free(ifaces);
} else {
- status = stream_setup_socket(task, task->event_ctx, task->lp_ctx,
- model_ops, &web_stream_ops,
+ status = stream_setup_socket(task, task->event_ctx,
+ task->lp_ctx, model_ops,
+ &web_stream_ops,
"ipv4", lpcfg_socket_address(task->lp_ctx),
- &port, lpcfg_socket_options(task->lp_ctx), task);
+ &port, lpcfg_socket_options(task->lp_ctx),
+ wdata);
if (!NT_STATUS_IS_OK(status)) goto failed;
}
-
- /* startup the esp processor - unfortunately we can't do this
- per connection as that wouldn't allow for session variables */
- wdata = talloc_zero(task, struct web_server_data);
- if (wdata == NULL)goto failed;
-
- task->private_data = wdata;
wdata->tls_params = tls_initialise(wdata, task->lp_ctx);
if (wdata->tls_params == NULL) goto failed;