summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/socket.cpp5
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;