Showing the changes to domain-server/src/NodeConnectionData.cpp (1 of 12 files). Show all
Unified · Split
| @@ -24,10 +24,11 @@ NodeConnectionData NodeConnectionData::fromDataStream(QDataStream& dataStream, c · 23 unmodified lines | |||
| 24 | char* rawBytes; | 24 | char* rawBytes; |
| 25 | uint length; | 25 | uint length; |
| 26 | 26 | ||
| 27 | // FIXME -- do we need to delete the rawBytes after it's been copied into the QByteArray? | ||
| 28 | dataStream.readBytes(rawBytes, length); | 27 | dataStream.readBytes(rawBytes, length); |
| 29 | newHeader.protocolVersion = QByteArray(rawBytes, length); | 28 | newHeader.protocolVersion = QByteArray(rawBytes, length); |
| 30 | //qDebug() << __FUNCTION__ << "...got protocol version from node... version:" << newHeader.protocolVersion; | 29 | |
| 30 | // NOTE: QDataStream::readBytes() - The buffer is allocated using new []. Destroy it with the delete [] operator. | ||
| 31 | delete[] rawBytes; | ||
| 31 | } | 32 | } |
| 32 | 33 | ||
| 33 | dataStream >> newHeader.nodeType | 34 | dataStream >> newHeader.nodeType |