]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspsocket.cpp
Patch: /rehash (not /rehash ssl) will now rebind SSL ports, but not dh params etc...
[user/henk/code/inspircd.git] / src / inspsocket.cpp
index c5b6f1838aa702454111a06f5dfc44c16e946949..0e8744d175b89b71603543131bee4cdeac2ea398 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -236,6 +236,7 @@ bool BufferedSocket::BindAddr(const std::string &ip)
                }
                j++;
        }
+       Instance->Log(DEBUG,"nothing in the config to bind()!");
        return true;
 }
 
@@ -343,6 +344,8 @@ bool BufferedSocket::DoConnect()
                }
                this->SetQueues(this->fd);
        }
+
+       Instance->Log(DEBUG,"BufferedSocket::DoConnect success");
        return true;
 }
 
@@ -533,6 +536,8 @@ bool BufferedSocket::FlushWriteBuffer()
 
 void SocketTimeout::Tick(time_t)
 {
+       ServerInstance->Log(DEBUG,"SocketTimeout::Tick");
+
        if (ServerInstance->SE->GetRef(this->sfd) != this->sock)
                return;
 
@@ -620,9 +625,14 @@ bool BufferedSocket::Poll()
                        }
                        else
 #endif
+                       {
+                               // FIX: we were doing this for IPv6 connections as well, which was fucking recvip..
+                               // Add brackets to make this a bit clearer. -- w00t (Jan 15, 2008)
+                               recvip = inet_ntoa(((sockaddr_in*)client)->sin_addr);
+                       }
+
                        Instance->SE->NonBlocking(incoming);
 
-                       recvip = inet_ntoa(((sockaddr_in*)client)->sin_addr);
                        this->OnIncomingConnection(incoming, (char*)recvip.c_str());
 
                        if (this->IsIOHooked)