Author: abartlet Date: 2006-01-10 09:17:58 +0000 (Tue, 10 Jan 2006) New Revision: 12817
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12817 Log: Create a ESP variable with the struct socket_address * in it, so we can pass that do the auth subsystem. Andrew Bartlett Modified: branches/SAMBA_4_0/source/web_server/http.c Changeset: Modified: branches/SAMBA_4_0/source/web_server/http.c =================================================================== --- branches/SAMBA_4_0/source/web_server/http.c 2006-01-10 09:15:57 UTC (rev 12816) +++ branches/SAMBA_4_0/source/web_server/http.c 2006-01-10 09:17:58 UTC (rev 12817) @@ -401,7 +401,7 @@ struct esp_data *edata = talloc_get_type(web->task->private, struct esp_data); struct EspRequest *req = esp->req; struct socket_address *socket_address = socket_get_my_addr(web->conn->socket, esp); - struct socket_address *peer_address = socket_get_my_addr(web->conn->socket, esp); + struct socket_address *peer_address = socket_get_peer_addr(web->conn->socket, esp); char *p; #define SETVAR(type, name, value) do { \ @@ -418,6 +418,10 @@ SETVAR(ESP_REQUEST_OBJ, "SCRIPT_NAME", p+1); SETVAR(ESP_REQUEST_OBJ, "SCRIPT_FILENAME", web->input.url); if (peer_address) { + struct MprVar mpv = mprObject("socket_address"); + mprSetPtrChild(&mpv, "socket_address", peer_address); + espSetVar(req, ESP_REQUEST_OBJ, "REMOTE_SOCKET_ADDRESS", mpv); + SETVAR(ESP_REQUEST_OBJ, "REMOTE_ADDR", peer_address->addr); } p = socket_get_peer_name(web->conn->socket, esp);