summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-11 18:05:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-11 18:05:04 +0000
commit73ccb31028433de49bb49d646e35653ab3c56db0 (patch)
tree4601f897fe52ff6b88490a528795257315d5a064 /src
parenta83d9d2d675054fc9fb499255511cdd83abbff96 (diff)
Sync Fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@543 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/connection.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index 3c743d233..71a0c266a 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -32,6 +32,7 @@ connection::connection()
key = GenKey();
fd = 0;
state = STATE_CLEAR;
+ buffer.clear();
}
@@ -304,7 +305,7 @@ bool connection::RecvPacket(char *message, char* host, int &prt, long &theirkey)
//int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
if (recvfrom(fd,&p,sizeof(p),0,(sockaddr*)&host_address,&host_address_size)<0)
{
- if (this->buffer.size() != -1)
+ if (this->buffer.length())
{
log(DEBUG,"Fetching a buffered packet");
@@ -348,7 +349,7 @@ bool connection::RecvPacket(char *message, char* host, int &prt, long &theirkey)
prt = ntohs(host_address.sin_port); // the port we received it on
SendACK(host,prt,p.id);
- if (this->buffer.size() != -1)
+ if (this->buffer.length())
{
log(DEBUG,"Fetching a buffered packet");
packet_buf pb;