]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ident.cpp
allow channels starting with ## in m_banredirect.cpp, fixes bug #921 reported by...
[user/henk/code/inspircd.git] / src / modules / m_ident.cpp
index fbd7706fe7efd2a802887b0b456b0ade555e2e53..ad62c77f98a7761abb2c7bf562f0d8ca2a94ff95 100644 (file)
@@ -83,7 +83,6 @@ class IdentRequestSocket : public EventHandler
        IdentRequestSocket(LocalUser* u) : user(u), result(u->ident)
        {
                age = ServerInstance->Time();
-               socklen_t size = 0;
 
                SetFd(socket(user->server_sa.sa.sa_family, SOCK_STREAM, 0));
 
@@ -110,7 +109,7 @@ class IdentRequestSocket : public EventHandler
                }
 
                /* Attempt to bind (ident requests must come from the ip the query is referring to */
-               if (ServerInstance->SE->Bind(GetFd(), &bindaddr.sa, size) < 0)
+               if (ServerInstance->SE->Bind(GetFd(), bindaddr) < 0)
                {
                        this->Close();
                        throw ModuleException("failed to bind()");
@@ -119,7 +118,7 @@ class IdentRequestSocket : public EventHandler
                ServerInstance->SE->NonBlocking(GetFd());
 
                /* Attempt connection (nonblocking) */
-               if (ServerInstance->SE->Connect(this, &connaddr.sa, size) == -1 && errno != EINPROGRESS)
+               if (ServerInstance->SE->Connect(this, &connaddr.sa, connaddr.sa_size()) == -1 && errno != EINPROGRESS)
                {
                        this->Close();
                        throw ModuleException("connect() failed");