# 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)))
/*
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;
}
/* 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;