summaryrefslogtreecommitdiff
path: root/daemon/httpauthd.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/httpauthd.c')
-rw-r--r--daemon/httpauthd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/daemon/httpauthd.c b/daemon/httpauthd.c
index e5b8dcb..c238a1a 100644
--- a/daemon/httpauthd.c
+++ b/daemon/httpauthd.c
@@ -340,9 +340,12 @@ int main(int argc, char* argv[])
continue;
}
+ memset(&sany, 0, sizeof(sany));
+ SANY_LEN(sany) = sizeof(sany);
+
/* Get the peer name */
if(getpeername(fd, &SANY_ADDR(sany), &SANY_LEN(sany)) == -1 ||
- sock_any_ntop(&sany, peername, MAXPATHLEN) == -1)
+ sock_any_ntop(&sany, peername, MAXPATHLEN, SANY_OPT_NOPORT) == -1)
ha_messagex(LOG_WARNING, "%d: couldn't get peer address", fd);
else
ha_messagex(LOG_INFO, "%d: accepted connection from: %s", fd, peername);