more logging

This commit is contained in:
ZappoMan 2017-04-26 15:28:10 -07:00
parent 7154a11192
commit 3de92121e0
3 changed files with 10 additions and 6 deletions

View file

@ -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<ReceivedMessage> 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());

View file

@ -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);
}

View file

@ -26,7 +26,7 @@
#include "TCPVegasCC.h"
#include "Connection.h"
//#define UDT_CONNECTION_DEBUG
#define UDT_CONNECTION_DEBUG
class UDTTest;