From 934e932387ea5668ec000bcefe4ec86935297339 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 2 Dec 2007 21:32:08 +0100 Subject: r26235: Avoid global_loadparm. (This used to be commit e9039782204389cc827e76da319d5ccf6d33be46) --- source4/web_server/http.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/web_server') diff --git a/source4/web_server/http.c b/source4/web_server/http.c index 67329fba7e..db2021a16c 100644 --- a/source4/web_server/http.c +++ b/source4/web_server/http.c @@ -388,7 +388,7 @@ static void http_simple_request(struct websrv_context *web) const char *path; struct stat st; - path = http_local_path(web, url, lp_swat_directory(global_loadparm)); + path = http_local_path(web, url, lp_swat_directory(web->task->lp_ctx)); if (path == NULL) goto invalid; /* looks ok */ @@ -470,7 +470,7 @@ static void http_setup_arrays(struct esp_state *esp) talloc_asprintf(esp, "%u", socket_address->port)); } - SETVAR(ESP_SERVER_OBJ, "DOCUMENT_ROOT", lp_swat_directory(global_loadparm)); + SETVAR(ESP_SERVER_OBJ, "DOCUMENT_ROOT", lp_swat_directory(esp->web->task->lp_ctx)); SETVAR(ESP_SERVER_OBJ, "SERVER_PROTOCOL", tls_enabled(web->conn->socket)?"https":"http"); SETVAR(ESP_SERVER_OBJ, "SERVER_SOFTWARE", "SAMBA"); SETVAR(ESP_SERVER_OBJ, "GATEWAY_INTERFACE", "CGI/1.1"); @@ -515,7 +515,7 @@ static void esp_request(struct esp_state *esp, const char *url) int res; char *emsg = NULL, *buf; - if (http_readFile(web, &buf, &size, url, lp_swat_directory(global_loadparm)) != 0) { + if (http_readFile(web, &buf, &size, url, lp_swat_directory(esp->web->task->lp_ctx)) != 0) { http_error_unix(web, url); return; } @@ -547,7 +547,7 @@ static bool http_preauth(struct esp_state *esp) { const char *path = http_local_path(esp->web, HTTP_PREAUTH_URI, - lp_swat_directory(global_loadparm)); + lp_swat_directory(esp->web->task->lp_ctx)); int i; if (path == NULL) { http_error(esp->web, 500, "Internal server error"); @@ -734,7 +734,7 @@ static void http_setup_session(struct esp_state *esp) s->data = NULL; s->te = NULL; s->edata = edata; - s->lifetime = lp_parm_int(global_loadparm, NULL, "web", "sessiontimeout", 900); + s->lifetime = lp_parm_int(esp->web->task->lp_ctx, NULL, "web", "sessiontimeout", 900); DLIST_ADD(edata->sessions, s); talloc_set_destructor(s, session_destructor); if (!generated_key) { -- cgit