diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-22 14:55:57 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-22 14:55:57 +0000 |
commit | 235864add961270140c956647d783fa79b5f7120 (patch) | |
tree | 14d1f578df871cb6069df70482dc298282b4f49e /src | |
parent | 6cd7b8ce33c3e7d2743426ab0cb795ce5d32a283 (diff) |
Fall back to copying bind IP if getsockname() fails, as it apparently can on Windows
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12314 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/listensocket.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/listensocket.cpp b/src/listensocket.cpp index 6ae598ad3..b0fce7b5b 100644 --- a/src/listensocket.cpp +++ b/src/listensocket.cpp @@ -78,7 +78,10 @@ void ListenSocket::AcceptInternal() socklen_t sz = sizeof(server); if (getsockname(incomingSockfd, &server.sa, &sz)) + { ServerInstance->Logs->Log("SOCKET", DEBUG, "Can't get peername: %s", strerror(errno)); + irc::sockets::aptosa(bind_addr, bind_port, server); + } /* * XXX - |