From df75db67ebe271e9de92cc65872ff65b46e4ad4a Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 7 Oct 2009 20:58:14 +0000 Subject: (svn r17742) -Codechange: remove unused variable from Recv_Packet --- src/network/core/tcp.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/network/core/tcp.cpp') diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp index 2064945a7..b30e4e526 100644 --- a/src/network/core/tcp.cpp +++ b/src/network/core/tcp.cpp @@ -131,13 +131,11 @@ bool NetworkTCPSocketHandler::Send_Packets() * @param status the variable to store the status into * @return the received packet (or NULL when it didn't receive one) */ -Packet *NetworkTCPSocketHandler::Recv_Packet(NetworkRecvStatus *status) +Packet *NetworkTCPSocketHandler::Recv_Packet() { ssize_t res; Packet *p; - *status = NETWORK_RECV_STATUS_OKAY; - if (!this->IsConnected()) return NULL; if (this->packet_recv == NULL) { @@ -157,7 +155,7 @@ Packet *NetworkTCPSocketHandler::Recv_Packet(NetworkRecvStatus *status) if (err != EWOULDBLOCK) { /* Something went wrong... (104 is connection reset by peer) */ if (err != 104) DEBUG(net, 0, "recv failed with error %d", err); - *status = this->CloseConnection(); + this->CloseConnection(); return NULL; } /* Connection would block, so stop for now */ @@ -165,7 +163,7 @@ Packet *NetworkTCPSocketHandler::Recv_Packet(NetworkRecvStatus *status) } if (res == 0) { /* Client/server has left */ - *status = this->CloseConnection(); + this->CloseConnection(); return NULL; } p->pos += res; @@ -175,7 +173,7 @@ Packet *NetworkTCPSocketHandler::Recv_Packet(NetworkRecvStatus *status) p->ReadRawPacketSize(); if (p->size > SEND_MTU) { - *status = this->CloseConnection(); + this->CloseConnection(); return NULL; } } @@ -188,7 +186,7 @@ Packet *NetworkTCPSocketHandler::Recv_Packet(NetworkRecvStatus *status) if (err != EWOULDBLOCK) { /* Something went wrong... (104 is connection reset by peer) */ if (err != 104) DEBUG(net, 0, "recv failed with error %d", err); - *status = this->CloseConnection(); + this->CloseConnection(); return NULL; } /* Connection would block */ @@ -196,7 +194,7 @@ Packet *NetworkTCPSocketHandler::Recv_Packet(NetworkRecvStatus *status) } if (res == 0) { /* Client/server has left */ - *status = this->CloseConnection(); + this->CloseConnection(); return NULL; } -- cgit v1.2.3-70-g09d2