more packet version changes to various server targets

This commit is contained in:
Stephen Birarda 2013-07-08 15:09:14 -07:00
parent c8b0e4bfe7
commit b482f479b6
3 changed files with 6 additions and 3 deletions

View file

@ -724,7 +724,8 @@ int main(int argc, const char * argv[])
}
// Nodes sending messages to us...
if (nodeList->getNodeSocket()->receive(&nodePublicAddress, packetData, &receivedBytes)) {
if (nodeList->getNodeSocket()->receive(&nodePublicAddress, packetData, &receivedBytes) &&
packetVersionMatch(packetData)) {
NodeList::getInstance()->processNodeData(&nodePublicAddress, packetData, receivedBytes);
}
}

View file

@ -49,7 +49,8 @@ void *receiveNodeData(void *args) {
NodeList* nodeList = NodeList::getInstance();
while (!::stopReceiveNodeDataThread) {
if (nodeList->getNodeSocket()->receive(&senderAddress, incomingPacket, &bytesReceived)) {
if (nodeList->getNodeSocket()->receive(&senderAddress, incomingPacket, &bytesReceived) &&
packetVersionMatch(incomingPacket)) {
switch (incomingPacket[0]) {
case PACKET_TYPE_BULK_AVATAR_DATA:
// this is the positional data for other nodes

View file

@ -169,7 +169,8 @@ int main(int argc, char* argv[]) {
NodeList::getInstance()->sendDomainServerCheckIn();
}
while (nodeList->getNodeSocket()->receive(&senderAddress, incomingPacket, &bytesReceived)) {
while (nodeList->getNodeSocket()->receive(&senderAddress, incomingPacket, &bytesReceived) &&
packetVersionMatch(incomingPacket)) {
switch (incomingPacket[0]) {
case PACKET_TYPE_BULK_AVATAR_DATA: // this is the positional data for other nodes
// pass that off to the nodeList processBulkNodeData method