summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-13 20:23:11 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-13 20:23:11 +0000
commit800f02e7599d5f90d1c16f02cb1c28901d354140 (patch)
tree2da147749bca500bd751461133fbb4d405f3ea17 /src/modules
parentc6140ba7048e0e1bc11bd827639953742d03e380 (diff)
Get rid of socklen_t parameter to Bind, we are using C++ here and can do it other ways
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12129 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_ident.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index fbd7706fe..ad62c77f9 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -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");