summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-03 04:08:20 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-03 04:08:20 +0000
commit8ed74be517990d100bdfe237a002d5115ea85a5e (patch)
treeb9d50cac1077d59fb06cc9b164572573ad393e7a /src/socket.cpp
parentde25d946733f774e3a5b53a58438a9c92af0acbe (diff)
Fix crash due to null address in DNS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11797 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 00be4250b..9ec6c9982 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -27,10 +27,7 @@ bool InspIRCd::BindSocket(int sockfd, int port, const char* addr, bool dolisten)
sockaddrs servaddr;
int ret;
- if (*addr == '*' || *addr == '\0')
- addr = NULL;
-
- if (port == -1 && !addr)
+ if ((*addr == '*' || *addr == '\0') && port == -1)
{
/* Port -1: Means UDP IPV4 port binding - Special case
* used by DNS engine.