From 98b57d5eb61094a9c88e2f7d90d3e21b7e74e9d8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 16:46:30 +0000 Subject: r25035: Fix some more warnings, use service pointer rather than service number in more places. (This used to be commit df9cebcb97e20564359097148665bd519f31bc6f) --- source4/web_server/http.c | 4 ++-- source4/web_server/web_server.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/web_server') diff --git a/source4/web_server/http.c b/source4/web_server/http.c index 985f1c04086..fb103f16c5d 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 efad8b6512c..221c792f14f 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') { -- cgit