summaryrefslogtreecommitdiff
path: root/source4/web_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-23 20:40:05 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-21 16:03:52 +0200
commitef5a04485ae256f9b803da9173d6194ced82e358 (patch)
treedbfcb567b34b65f8494cbc9ff37f9b026ab4f704 /source4/web_server
parentda987d8fb407a1386462e295f61ff7dcfb757d1d (diff)
downloadsamba-ef5a04485ae256f9b803da9173d6194ced82e358.tar.gz
samba-ef5a04485ae256f9b803da9173d6194ced82e358.tar.bz2
samba-ef5a04485ae256f9b803da9173d6194ced82e358.zip
Rename http to esp, in preparation of adding a python backend.
Diffstat (limited to 'source4/web_server')
-rw-r--r--source4/web_server/config.mk2
-rw-r--r--source4/web_server/esp.c (renamed from source4/web_server/http.c)16
-rw-r--r--source4/web_server/web_server.c4
3 files changed, 11 insertions, 11 deletions
diff --git a/source4/web_server/config.mk b/source4/web_server/config.mk
index 02f686af0b..4094d6be07 100644
--- a/source4/web_server/config.mk
+++ b/source4/web_server/config.mk
@@ -10,6 +10,6 @@ PRIVATE_DEPENDENCIES = ESP LIBTLS smbcalls process_model
# End SUBSYSTEM WEB
#######################
-WEB_OBJ_FILES = $(addprefix $(web_serversrcdir)/, web_server.o http.o)
+WEB_OBJ_FILES = $(addprefix $(web_serversrcdir)/, web_server.o esp.o)
$(eval $(call proto_header_template,$(web_serversrcdir)/proto.h,$(WEB_OBJ_FILES:.o=.c)))
diff --git a/source4/web_server/http.c b/source4/web_server/esp.c
index bd6efa9262..901a1558c4 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/esp.c
@@ -1014,17 +1014,17 @@ NTSTATUS http_parse_header(struct websrv_context *web, const char *line)
/*
setup the esp processor - called at task initialisation
*/
-NTSTATUS http_setup_esp(struct task_server *task)
+struct esp_data *http_setup_esp(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
{
struct esp_data *edata;
- edata = talloc_zero(task, struct esp_data);
- NT_STATUS_HAVE_NO_MEMORY(edata);
+ edata = talloc_zero(mem_ctx, struct esp_data);
+ if (edata == NULL)
+ return NULL;
- task->private = edata;
+ edata->tls_params = tls_initialise(edata, lp_ctx);
+ if (edata->tls_params == NULL)
+ return NULL;
- edata->tls_params = tls_initialise(edata, task->lp_ctx);
- NT_STATUS_HAVE_NO_MEMORY(edata->tls_params);
-
- return NT_STATUS_OK;
+ return edata;
}
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index ac83a3384d..bfbd254d9e 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -280,8 +280,8 @@ static void websrv_task_init(struct task_server *task)
/* startup the esp processor - unfortunately we can't do this
per connection as that wouldn't allow for session variables */
- status = http_setup_esp(task);
- if (!NT_STATUS_IS_OK(status)) goto failed;
+ task->private = http_setup_esp(task, task->lp_ctx);
+ if (task->private == NULL) goto failed;
return;