mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 15:30:38 +02:00
cleanup check for attached socket
This commit is contained in:
parent
3f2dc7a28d
commit
fb7927d326
1 changed files with 18 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue