Browse Source

minor cleanup

master
Tom Early 12 months ago
parent
commit
ca0095835f
  1. 4
      m17protocol.cpp
  2. 1
      peercallsignlist.cpp

4
m17protocol.cpp

@ -375,7 +375,7 @@ void CM17Protocol::HandleKeepalives(void)
CPeers *peers = g_Reflector.GetPeers();
auto pit = peers->begin();
std::shared_ptr<CPeer>peer = nullptr;
while ( (peer = peers->FindNextPeer(PROTOCOL_M17, pit)) != nullptr )
while ( nullptr != (peer = peers->FindNextPeer(PROTOCOL_M17, pit)) )
{
// send keepalive
Send(keepalive, 10, peer->GetIp());
@ -395,7 +395,7 @@ void CM17Protocol::HandleKeepalives(void)
Send(disconnect, 10, peer->GetIp());
// remove it
std::cout << "M17 peer " << peer->GetCallsign() << " keepalive timeout" << std::endl;
std::cout << "Peer " << peer->GetCallsign() << " keepalive timeout" << std::endl;
peers->RemovePeer(peer);
}
}

1
peercallsignlist.cpp

@ -84,7 +84,6 @@ bool CPeerCallsignList::LoadFromFile(const char *filename)
std::cout << "Gatekeeper loaded " << m_Callsigns.size() << " lines from " << filename << std::endl;
Lock();
std::cout << "PEER ENUMERATION: Count=" << m_Callsigns.size() << std::endl;
for (auto it = m_Callsigns.begin(); it != m_Callsigns.end(); it++)
std::cout << (*it).GetCallsign() << std::endl;
Unlock();

Loading…
Cancel
Save