Rename http to esp, in preparation of adding a python backend.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 23 May 2008 18:40:05 +0000 (20:40 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 21 Sep 2008 14:03:52 +0000 (16:03 +0200)
source4/web_server/config.mk
source4/web_server/esp.c [moved from source4/web_server/http.c with 98% similarity]
source4/web_server/web_server.c

index 02f686af0b3789e686d2fa9452160e24dc6fda9d..4094d6be072904841521fb102342ea2ff87fc92c 100644 (file)
@@ -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)))
similarity index 98%
rename from source4/web_server/http.c
rename to source4/web_server/esp.c
index bd6efa9262aac42ecd7b6d7769ccc62af91bfc94..901a1558c483667fa39f6545e41c014cd19f6fae 100644 (file)
@@ -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;
 }
index ac83a3384d5cd3f145d934948654fc126c61ae59..bfbd254d9e91ef9c0059a16af94ee20cdd31b8d5 100644 (file)
@@ -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;