History

send an empty key when making a UUID request

Stephen Birarda committed 13 years ago

Commit ae59ce21 parent 85edb932 files · +7 −3Browse files

Showing the changes to interface/src/DataServerClient.cpp (1 of 2 files). Show all

Unified · Split

interface/src/DataServerClient.cpp+6−2
@@ -78,8 +78,12 @@ void DataServerClient::getValueForKeyAndUserString(const char* key, QString& use · 77 unmodified lines
78 78
79 // pack the key, null terminated79 // pack the key, null terminated
80 strcpy((char*) getPacket + numPacketBytes, key);80 strcpy((char*) getPacket + numPacketBytes, key);
81 numPacketBytes += strlen(key);81 int numKeyBytes = strlen(key);
82 getPacket[numPacketBytes++] = '\0';82
83 if (numKeyBytes > 0) {
84 numPacketBytes += numKeyBytes;
85 getPacket[numPacketBytes++] = '\0';
86 }
83 87
84 // add the getPacket to our vector of uncofirmed packets, will be deleted once we get a response from the nameserver88 // add the getPacket to our vector of uncofirmed packets, will be deleted once we get a response from the nameserver
85 _unmatchedPackets.insert(std::pair<unsigned char*, int>(getPacket, numPacketBytes));89 _unmatchedPackets.insert(std::pair<unsigned char*, int>(getPacket, numPacketBytes));