mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 01:56:22 +02:00
Merge pull request #1254 from ZappoMan/bugfixes
added more noisy debugging
This commit is contained in:
commit
10b5f885f5
1 changed files with 40 additions and 0 deletions
|
@ -655,10 +655,16 @@ void VoxelServer::run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for >= in case one gets past the goalie
|
// check for >= in case one gets past the goalie
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() CALLING NodeList::getInstance()->getNumNoReplyDomainCheckIns()\n";
|
||||||
|
}
|
||||||
if (NodeList::getInstance()->getNumNoReplyDomainCheckIns() >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
|
if (NodeList::getInstance()->getNumNoReplyDomainCheckIns() >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
|
||||||
qDebug() << "Exit loop... getInstance()->getNumNoReplyDomainCheckIns() >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS\n";
|
qDebug() << "Exit loop... getInstance()->getNumNoReplyDomainCheckIns() >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() AFTER CALLING NodeList::getInstance()->getNumNoReplyDomainCheckIns()\n";
|
||||||
|
}
|
||||||
|
|
||||||
// send a check in packet to the domain server if DOMAIN_SERVER_CHECK_IN_USECS has elapsed
|
// send a check in packet to the domain server if DOMAIN_SERVER_CHECK_IN_USECS has elapsed
|
||||||
if (usecTimestampNow() - usecTimestamp(&lastDomainServerCheckIn) >= DOMAIN_SERVER_CHECK_IN_USECS) {
|
if (usecTimestampNow() - usecTimestamp(&lastDomainServerCheckIn) >= DOMAIN_SERVER_CHECK_IN_USECS) {
|
||||||
|
@ -673,8 +679,17 @@ void VoxelServer::run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ping our inactive nodes to punch holes with them
|
// ping our inactive nodes to punch holes with them
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() CALLING nodeList->possiblyPingInactiveNodes()\n";
|
||||||
|
}
|
||||||
nodeList->possiblyPingInactiveNodes();
|
nodeList->possiblyPingInactiveNodes();
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() AFTER CALLING nodeList->possiblyPingInactiveNodes()\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() CALLING nodeList->getNodeSocket()->receive()\n";
|
||||||
|
}
|
||||||
if (nodeList->getNodeSocket()->receive(&senderAddress, packetData, &packetLength) &&
|
if (nodeList->getNodeSocket()->receive(&senderAddress, packetData, &packetLength) &&
|
||||||
packetVersionMatch(packetData)) {
|
packetVersionMatch(packetData)) {
|
||||||
|
|
||||||
|
@ -686,18 +701,43 @@ void VoxelServer::run() {
|
||||||
QUuid nodeUUID = QUuid::fromRfc4122(QByteArray((char*)packetData + numBytesPacketHeader,
|
QUuid nodeUUID = QUuid::fromRfc4122(QByteArray((char*)packetData + numBytesPacketHeader,
|
||||||
NUM_BYTES_RFC4122_UUID));
|
NUM_BYTES_RFC4122_UUID));
|
||||||
|
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() CALLING nodeList->nodeWithUUID() line: " << __LINE__ << "\n";
|
||||||
|
}
|
||||||
Node* node = nodeList->nodeWithUUID(nodeUUID);
|
Node* node = nodeList->nodeWithUUID(nodeUUID);
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() AFTER CALLING nodeList->nodeWithUUID() line: " << __LINE__ << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if (node) {
|
if (node) {
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() CALLING nodeList->updateNodeWithData() line: " << __LINE__ << "\n";
|
||||||
|
}
|
||||||
nodeList->updateNodeWithData(node, &senderAddress, packetData, packetLength);
|
nodeList->updateNodeWithData(node, &senderAddress, packetData, packetLength);
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() AFTER CALLING nodeList->updateNodeWithData() line: " << __LINE__ << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() CALLING nodeList->getActiveSocket() line: " << __LINE__ << "\n";
|
||||||
|
}
|
||||||
if (!node->getActiveSocket()) {
|
if (!node->getActiveSocket()) {
|
||||||
// we don't have an active socket for this node, but they're talking to us
|
// we don't have an active socket for this node, but they're talking to us
|
||||||
// this means they've heard from us and can reply, let's assume public is active
|
// this means they've heard from us and can reply, let's assume public is active
|
||||||
node->activatePublicSocket();
|
node->activatePublicSocket();
|
||||||
}
|
}
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() AFTER CALLING nodeList->getActiveSocket() line: " << __LINE__ << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() CALLING node->getLinkedData() line: " << __LINE__ << "\n";
|
||||||
|
}
|
||||||
VoxelNodeData* nodeData = (VoxelNodeData*) node->getLinkedData();
|
VoxelNodeData* nodeData = (VoxelNodeData*) node->getLinkedData();
|
||||||
|
if (wantNoisyDebugging) {
|
||||||
|
qDebug() << "VoxelServer::run() AFTER CALLING node->getLinkedData() line: " << __LINE__ << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if (nodeData && !nodeData->isVoxelSendThreadInitalized()) {
|
if (nodeData && !nodeData->isVoxelSendThreadInitalized()) {
|
||||||
nodeData->initializeVoxelSendThread(this);
|
nodeData->initializeVoxelSendThread(this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue