diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-04-27 18:25:21 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-04-27 18:45:42 +0200 |
commit | d1db751ff8e6b15c059db254b57c72dfda8d4bfc (patch) | |
tree | 058c1b02bd74a15a56ea576c16129867fe9efcff | |
parent | 79a29a8cd65534884934c60ae2fb2854e064722b (diff) | |
download | samba-d1db751ff8e6b15c059db254b57c72dfda8d4bfc.tar.gz samba-d1db751ff8e6b15c059db254b57c72dfda8d4bfc.tar.bz2 samba-d1db751ff8e6b15c059db254b57c72dfda8d4bfc.zip |
Revert "s4:web_server: use tsocket_address functions to get the local ip and port"
This reverts commit 9a1a00199c2603376eacfdba7e7d0d55bc64f405.
This broke the build.
-rw-r--r-- | source4/web_server/wsgi.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c index 7ee70e1107..4f1a75e010 100644 --- a/source4/web_server/wsgi.c +++ b/source4/web_server/wsgi.c @@ -26,7 +26,6 @@ #include "../lib/util/dlinklist.h" #include "../lib/util/data_blob.h" #include "lib/tls/tls.h" -#include "lib/tsocket/tsocket.h" typedef struct { PyObject_HEAD @@ -321,23 +320,18 @@ static void wsgi_process_http_input(struct web_server_data *wdata, { PyObject *py_environ, *result, *item, *iter; PyObject *request_handler = (PyObject *)wdata->private_data; - struct tsocket_address *my_address = web->conn->local_address; - const char *addr = "0.0.0.0"; - uint16_t port = 0; + struct socket_address *socket_address; + web_request_Object *py_web = PyObject_New(web_request_Object, &web_request_Type); py_web->web = web; - if (tsocket_address_is_inet(my_address, "ip")) { - addr = tsocket_address_inet_addr_string(my_address, wdata); - port = tsocket_address_inet_port(my_address); - } - + socket_address = socket_get_my_addr(web->conn->socket, web); py_environ = create_environ(tls_enabled(web->conn->socket), web->input.content_length, web->input.headers, web->input.post_request?"POST":"GET", - addr, - port, + socket_address->addr, + socket_address->port, Py_InputHttpStream(web), web->input.url ); |