diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-24 00:20:49 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-24 00:20:49 +0000 |
commit | c91f02365832acf9ae6d4a4aaad3ed1f89c17714 (patch) | |
tree | a942d2e61980913c51df9796aeadbbee7d4f8f41 /src | |
parent | 59b1a8955142935b02af6446005ab47fc7c3fc8c (diff) |
Wrong address being bound by InspSocket when binding to a specific ip
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3315 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/socket.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index 282d3c5a7..1af2b51ff 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -59,9 +59,10 @@ InspSocket::InspSocket(int newfd, char* ip) socket_ref[this->fd] = this; } -InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long maxtime) +InspSocket::InspSocket(std::string ahost, int port, bool listening, unsigned long maxtime) { this->fd = -1; + this->host = ahost; if (listening) { if ((this->fd = OpenTCPSocket()) == ERROR) { @@ -73,7 +74,7 @@ InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long } else { - if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR) + if (BindSocket(this->fd,this->client,this->server,port,(char*)ahost.c_str()) == ERROR) { this->Close(); this->fd = -1; |