From dc56649b0e188704512719be80ecb6f544cef0e7 Mon Sep 17 00:00:00 2001 From: David Troy Date: Mon, 3 Apr 2006 01:57:46 +0000 Subject: git-svn-id: http://svncommunity.digium.com/svn/astmanproxy/branches/1.20pre@70 f02b47b9-160a-0410-81a6-dc3441afb0ec --- src/astmanproxy.c | 2 +- src/http.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/astmanproxy.c b/src/astmanproxy.c index 3c976e6..cc86859 100644 --- a/src/astmanproxy.c +++ b/src/astmanproxy.c @@ -576,7 +576,7 @@ static void *accept_thread() memcpy(&s->sin, &sin, sizeof(sin)); /* For safety, make sure socket is non-blocking */ - flags = fcntl(as, F_GETFL); + flags = fcntl(get_real_fd(as), F_GETFL); fcntl(get_real_fd(as), F_SETFL, flags | O_NONBLOCK); pthread_mutex_init(&s->lock, NULL); diff --git a/src/http.c b/src/http.c index f14c722..70cc2b9 100644 --- a/src/http.c +++ b/src/http.c @@ -74,6 +74,7 @@ int _read(struct mansession *s, struct message *m) { memset(method, 0, sizeof method); memset(formdata, 0, sizeof formdata); + memset(header, 0, sizeof header); /* for http, don't do get_input forever */ for (;;) { -- cgit