More debug messages.
This commit is contained in:
parent
de882dee07
commit
f6d5c78f1a
@ -394,7 +394,9 @@ namespace Components
|
|||||||
Node::NodeEntry* entry = Node::FindNode(address);
|
Node::NodeEntry* entry = Node::FindNode(address);
|
||||||
if (!entry || entry->state != Node::STATE_NEGOTIATING) return;
|
if (!entry || entry->state != Node::STATE_NEGOTIATING) return;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
Logger::Print("Received synchronization data for registration from %s!\n", address.GetString());
|
Logger::Print("Received synchronization data for registration from %s!\n", address.GetString());
|
||||||
|
#endif
|
||||||
|
|
||||||
Proto::Node::Packet packet;
|
Proto::Node::Packet packet;
|
||||||
if (!packet.ParseFromString(data)) return;
|
if (!packet.ParseFromString(data)) return;
|
||||||
@ -414,14 +416,15 @@ namespace Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::Print("Signature from %s for challenge '%s' is valid!\n", address.GetString(), entry->challenge.data());
|
|
||||||
|
|
||||||
// Mark as registered
|
// Mark as registered
|
||||||
entry->lastTime = Game::Com_Milliseconds();
|
entry->lastTime = Game::Com_Milliseconds();
|
||||||
entry->state = Node::STATE_VALID;
|
entry->state = Node::STATE_VALID;
|
||||||
entry->registered = true;
|
entry->registered = true;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
Logger::Print("Signature from %s for challenge '%s' is valid!\n", address.GetString(), entry->challenge.data());
|
||||||
Logger::Print("Node %s registered\n", address.GetString());
|
Logger::Print("Node %s registered\n", address.GetString());
|
||||||
|
#endif
|
||||||
|
|
||||||
// Build response
|
// Build response
|
||||||
publicKey = Node::SignatureKey.GetPublicKey();
|
publicKey = Node::SignatureKey.GetPublicKey();
|
||||||
|
Loading…
Reference in New Issue
Block a user