summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-11 17:03:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-11 17:03:39 +0000
commite97649597a0c81603e632481baeeeabbcc7a0108 (patch)
treefecab18bc3ac38062a9b718ff26735b0e968cb7e
parent5ceee7dfb26c2874c8b70e152b9a9fc451e90b9c (diff)
More race condition fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@535 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/connection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index 78b9ed17a..b1ed34455 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -289,7 +289,7 @@ bool connection::RecvPacket(char *message, char* host, int &prt, long &theirkey)
return false;
}
- log(DEBUG,"connection::RecvPacket(): received packet type %d '%s'",p.type,p.data);
+ log(DEBUG,"connection::RecvPacket(): received packet type %d '%s' from '%s'",p.type,p.data,inet_ntoa(host_address.sin_addr));
if (p.type == PT_SYN_ONLY)
{
@@ -314,8 +314,8 @@ bool connection::RecvPacket(char *message, char* host, int &prt, long &theirkey)
strcpy(message,p.data);
strcpy(host,inet_ntoa(host_address.sin_addr));
theirkey = p.key;
- prt = ntohs(host_address.sin_port);
- SendACK(host,this->port,p.id);
+ prt = ntohs(host_address.sin_port); // the port we received it on
+ SendACK(host,prt,p.id);
return true;
}