summaryrefslogtreecommitdiff
path: root/src/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection.cpp')
-rw-r--r--src/connection.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index 71a0c266a..609b98880 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -305,10 +305,9 @@ 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.length())
+ if (buffer.size())
{
- log(DEBUG,"Fetching a buffered packet");
-
+ log(DEBUG,"Fetching a buffered packet size %d",buffer.size());
strcpy(message,buffer[0].p.data);
theirkey = buffer[0].p.key;
strcpy(host,buffer[0].host);
@@ -349,9 +348,9 @@ 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.length())
+ if (buffer.size())
{
- log(DEBUG,"Fetching a buffered packet");
+ log(DEBUG,"Fetching a buffered packet size %d",buffer.size());
packet_buf pb;
pb.p.id = p.id;
pb.p.key = p.key;