summaryrefslogtreecommitdiff
path: root/source4/web_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-08 16:46:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:43 -0500
commit98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8 (patch)
tree044b24a249cc2b63c2f69214d7e7da288c170c74 /source4/web_server
parentce0ff008b5c5af931526d14fa6232f8647e0880f (diff)
downloadsamba-98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8.tar.gz
samba-98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8.tar.bz2
samba-98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8.zip
r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97e20564359097148665bd519f31bc6f)
Diffstat (limited to 'source4/web_server')
-rw-r--r--source4/web_server/http.c4
-rw-r--r--source4/web_server/web_server.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index 985f1c0408..fb103f16c5 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -152,7 +152,7 @@ static int http_readFile(EspHandle handle,
fd = open(path, O_RDONLY);
if (fd == -1 || fstat(fd, &st) != 0 || !S_ISREG(st.st_mode)) goto failed;
- *buf = talloc_size(handle, st.st_size+1);
+ *buf = talloc_array(handle, char, st.st_size+1);
if (*buf == NULL) goto failed;
if (read(fd, *buf, st.st_size) != st.st_size) goto failed;
@@ -808,7 +808,7 @@ static void http_setup_session(struct esp_state *esp)
s->data = NULL;
s->te = NULL;
s->edata = edata;
- s->lifetime = lp_parm_int(-1, "web", "sessiontimeout", 900);
+ s->lifetime = lp_parm_int(NULL, "web", "sessiontimeout", 900);
DLIST_ADD(edata->sessions, s);
talloc_set_destructor(s, session_destructor);
if (!generated_key) {
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index efad8b6512..221c792f14 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -85,7 +85,7 @@ static void websrv_recv(struct stream_connection *conn, uint16_t flags)
/* parse any lines that are available */
b = web->input.partial;
while (!web->input.end_of_headers &&
- (p=memchr(b.data, '\n', b.length))) {
+ (p=(uint8_t *)memchr(b.data, '\n', b.length))) {
const char *line = (const char *)b.data;
*p = 0;
if (p != b.data && p[-1] == '\r') {