summaryrefslogtreecommitdiff
path: root/source4/web_server/http.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-07-31 13:34:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:15:16 -0500
commit9b6f35edbf439fec4a0d32104ee8475bf1e313c9 (patch)
tree54566bef45c235824e90891684547c6ce196dfa5 /source4/web_server/http.c
parent9e0993a647d4062f98c0c9039d10158d9029c38e (diff)
downloadsamba-9b6f35edbf439fec4a0d32104ee8475bf1e313c9.tar.gz
samba-9b6f35edbf439fec4a0d32104ee8475bf1e313c9.tar.bz2
samba-9b6f35edbf439fec4a0d32104ee8475bf1e313c9.zip
r17339: pass the event context and messaging context together to the
smb ejs functions metze (This used to be commit 0397911b414518d54f6dba2a8c81a5872b90a034)
Diffstat (limited to 'source4/web_server/http.c')
-rw-r--r--source4/web_server/http.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index 8dd594de20..3e27b8f089 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -755,8 +755,9 @@ static const struct Esp esp_control = {
void http_process_input(struct websrv_context *web)
{
NTSTATUS status;
- struct esp_state *esp;
+ struct esp_state *esp = NULL;
struct esp_data *edata = talloc_get_type(web->task->private, struct esp_data);
+ struct smbcalls_context *smbcalls_ctx;
char *p;
void *save_mpr_ctx = mprMemCtx();
void *ejs_save = ejs_save_state();
@@ -777,7 +778,16 @@ void http_process_input(struct websrv_context *web)
{"esp", "text/html", True}
};
- esp = talloc_zero(web, struct esp_state);
+ /*
+ * give the smbcalls a chance to find the event context
+ * and messaging context
+ */
+ smbcalls_ctx = talloc(web, struct smbcalls_context);
+ if (smbcalls_ctx == NULL) goto internal_error;
+ smbcalls_ctx->event_ctx = web->conn->event.ctx;
+ smbcalls_ctx->msg_ctx = web->conn->msg_ctx;
+
+ esp = talloc_zero(smbcalls_ctx, struct esp_state);
if (esp == NULL) goto internal_error;
esp->web = web;