cleanup check for attached socket

This commit is contained in:
Stephen Birarda 2013-09-17 13:28:19 -07:00
parent 3f2dc7a28d
commit fb7927d326

View file

@ -67,8 +67,6 @@ Assignment::Assignment(const unsigned char* dataBuffer, int numBytes) :
memcpy(&_type, dataBuffer + numBytesRead, sizeof(Assignment::Type));
numBytesRead += sizeof(Assignment::Type);
if (numBytes > numBytesRead) {
if (_command != Assignment::RequestCommand) {
sockaddr* newSocket = NULL;
@ -90,13 +88,11 @@ Assignment::Assignment(const unsigned char* dataBuffer, int numBytes) :
}
}
if (numBytes > numBytesRead) {
_numPayloadBytes = numBytes - numBytesRead;
if (_numPayloadBytes > 0) {
memcpy(_payload, dataBuffer + numBytesRead, numBytes - numBytesRead);
}
}
}
Assignment::~Assignment() {
delete _attachedPublicSocket;