From 235864add961270140c956647d783fa79b5f7120 Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 22 Jan 2010 14:55:57 +0000 Subject: 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 --- src/listensocket.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 - -- cgit v1.2.3