mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:01:18 +02:00
only set UUID when not null, properly send UUID from data-server
This commit is contained in:
parent
3a9dc667db
commit
454a1cc6c9
2 changed files with 7 additions and 5 deletions
|
@ -137,10 +137,10 @@ void DataServer::readPendingDatagrams() {
|
||||||
|
|
||||||
packetData[0] = PACKET_TYPE_DATA_SERVER_SEND;
|
packetData[0] = PACKET_TYPE_DATA_SERVER_SEND;
|
||||||
|
|
||||||
const char MULTI_KEY_VALUE_SEPARATOR = '|';
|
|
||||||
|
|
||||||
if (strcmp((char*) packetData + readBytes, "uuid") != 0) {
|
if (strcmp((char*) packetData + readBytes, "uuid") != 0) {
|
||||||
|
|
||||||
|
const char MULTI_KEY_VALUE_SEPARATOR = '|';
|
||||||
|
|
||||||
// the user has sent one or more keys - make the associated requests
|
// the user has sent one or more keys - make the associated requests
|
||||||
for (int j = 0; j < numKeys; j++) {
|
for (int j = 0; j < numKeys; j++) {
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ void DataServer::readPendingDatagrams() {
|
||||||
} else {
|
} else {
|
||||||
// user is asking for a UUID matching username, copy the UUID we found
|
// user is asking for a UUID matching username, copy the UUID we found
|
||||||
QString uuidString = uuidStringWithoutCurlyBraces(parsedUUID);
|
QString uuidString = uuidStringWithoutCurlyBraces(parsedUUID);
|
||||||
memcpy(packetData + numSendPacketBytes, uuidString.constData(), uuidString.size() + sizeof('\0'));
|
memcpy(packetData + numSendPacketBytes, qPrintable(uuidString), uuidString.size() + sizeof('\0'));
|
||||||
numSendPacketBytes += uuidString.size() + sizeof('\0');
|
numSendPacketBytes += uuidString.size() + sizeof('\0');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,10 @@ QString Profile::getUserString() const {
|
||||||
void Profile::setUUID(const QUuid& uuid) {
|
void Profile::setUUID(const QUuid& uuid) {
|
||||||
_uuid = uuid;
|
_uuid = uuid;
|
||||||
|
|
||||||
// when the UUID is changed we need set it appropriately on the NodeList instance
|
if (!_uuid.isNull()) {
|
||||||
NodeList::getInstance()->setOwnerUUID(uuid);
|
// when the UUID is changed we need set it appropriately on the NodeList instance
|
||||||
|
NodeList::getInstance()->setOwnerUUID(uuid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Profile::setFaceModelURL(const QUrl& faceModelURL) {
|
void Profile::setFaceModelURL(const QUrl& faceModelURL) {
|
||||||
|
|
Loading…
Reference in a new issue