From 3de92121e0bd460e7b61118e947d1ccbbceeab8e Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 26 Apr 2017 15:28:10 -0700 Subject: [PATCH] more logging --- assignment-client/src/avatars/AvatarMixer.cpp | 6 +++--- assignment-client/src/avatars/AvatarMixerSlave.cpp | 8 ++++++-- libraries/networking/src/udt/Socket.h | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixer.cpp b/assignment-client/src/avatars/AvatarMixer.cpp index 5e131cbcd7..540a081fd8 100644 --- a/assignment-client/src/avatars/AvatarMixer.cpp +++ b/assignment-client/src/avatars/AvatarMixer.cpp @@ -70,7 +70,7 @@ AvatarMixer::~AvatarMixer() { } void AvatarMixer::sendIdentityPacket(AvatarMixerClientData* nodeData, const SharedNodePointer& destinationNode) { - qDebug() << __FUNCTION__ << "about to call nodeData->getAvatar().identityByteArray()... for node:" << nodeData->getNodeID(); + qDebug() << __FUNCTION__ << "about to call nodeData->getAvatar().identityByteArray()... for node:" << nodeData->getNodeID() << "destinationNode:" << destinationNode->getUUID(); QByteArray individualData = nodeData->getAvatar().identityByteArray(); auto identityPacket = NLPacket::create(PacketType::AvatarIdentity, individualData.size()); @@ -409,13 +409,13 @@ void AvatarMixer::handleAvatarIdentityPacket(QSharedPointer mes // parse the identity packet and update the change timestamp if appropriate AvatarData::Identity identity; - qCDebug(avatars) << __FUNCTION__ << "about to call parseAvatarIdentityPacket()"; + qCDebug(avatars) << __FUNCTION__ << "about to call parseAvatarIdentityPacket() for packet from node:" << nodeData->getNodeID(); AvatarData::parseAvatarIdentityPacket(message->getMessage(), identity); bool identityChanged = false; bool displayNameChanged = false; - qCDebug(avatars) << __FUNCTION__ << "about to call processAvatarIdentity()"; + qCDebug(avatars) << __FUNCTION__ << "about to call processAvatarIdentity() node:" << nodeData->getNodeID(); avatar.processAvatarIdentity(identity, identityChanged, displayNameChanged); if (identityChanged) { QMutexLocker nodeDataLocker(&nodeData->getMutex()); diff --git a/assignment-client/src/avatars/AvatarMixerSlave.cpp b/assignment-client/src/avatars/AvatarMixerSlave.cpp index 3266276a45..c3ff2a74dc 100644 --- a/assignment-client/src/avatars/AvatarMixerSlave.cpp +++ b/assignment-client/src/avatars/AvatarMixerSlave.cpp @@ -67,7 +67,7 @@ void AvatarMixerSlave::processIncomingPackets(const SharedNodePointer& node) { int AvatarMixerSlave::sendIdentityPacket(const AvatarMixerClientData* nodeData, const SharedNodePointer& destinationNode) { - qDebug() << __FUNCTION__ << "about to call nodeData->getConstAvatarData().identityByteArray()... for node:" << nodeData->getNodeID(); + qDebug() << __FUNCTION__ << "about to call nodeData->getConstAvatarData().identityByteArray()... for node:" << nodeData->getNodeID() << "destinationNode:" << destinationNode->getUUID(); QByteArray individualData = nodeData->getConstAvatarData()->identityByteArray(); individualData.replace(0, NUM_BYTES_RFC4122_UUID, nodeData->getNodeID().toRfc4122()); // FIXME, this looks suspicious auto identityPackets = NLPacketList::create(PacketType::AvatarIdentity, QByteArray(), true, true); @@ -303,7 +303,11 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) { // If the time that the mixer sent AVATAR DATA about Avatar B to Avatar A is BEFORE OR EQUAL TO // the time that Avatar B flagged an IDENTITY DATA change, send IDENTITY DATA about Avatar B to Avatar A. if (nodeData->getLastBroadcastTime(otherNode->getUUID()) <= otherNodeData->getIdentityChangeTimestamp()) { - qCDebug(avatars) << __FUNCTION__ << "about to call sendIdentityPacket()"; + qCDebug(avatars) << __FUNCTION__ << "about to call sendIdentityPacket()" + << "other node:" << otherNode->getUUID() + << "destination node:" << nodeData->getNodeID() + << "nodeData->getLastBroadcastTime(otherNode->getUUID()):" << nodeData->getLastBroadcastTime(otherNode->getUUID()) + << "otherNodeData->getIdentityChangeTimestamp():" << otherNodeData->getIdentityChangeTimestamp(); identityBytesSent += sendIdentityPacket(otherNodeData, node); } diff --git a/libraries/networking/src/udt/Socket.h b/libraries/networking/src/udt/Socket.h index 1919e00b41..df03178630 100644 --- a/libraries/networking/src/udt/Socket.h +++ b/libraries/networking/src/udt/Socket.h @@ -26,7 +26,7 @@ #include "TCPVegasCC.h" #include "Connection.h" -//#define UDT_CONNECTION_DEBUG +#define UDT_CONNECTION_DEBUG class UDTTest;