Use protocol name instead of number in logs

This commit is contained in:
phl0 2017-03-30 09:32:17 +02:00
parent f4394c41fe
commit f1f2b605b1
No known key found for this signature in database
GPG Key ID: 48EA1E640798CA9A
2 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ void CClients::AddClient(CClient *client)
// and append // and append
m_Clients.push_back(client); m_Clients.push_back(client);
std::cout << "New client " << client->GetCallsign() << " at " << client->GetIp() std::cout << "New client " << client->GetCallsign() << " at " << client->GetIp()
<< " added with protocol " << client->GetProtocol() << " added with protocol " << client->GetProtocolName()
<< " on module " << client->GetReflectorModule() << std::endl; << " on module " << client->GetReflectorModule() << std::endl;
// notify // notify
g_Reflector.OnClientsChanged(); g_Reflector.OnClientsChanged();
@ -106,7 +106,7 @@ void CClients::RemoveClient(CClient *client)
{ {
// remove it // remove it
std::cout << "Client " << m_Clients[i]->GetCallsign() << " at " << m_Clients[i]->GetIp() std::cout << "Client " << m_Clients[i]->GetCallsign() << " at " << m_Clients[i]->GetIp()
<< " removed with protocol " << client->GetProtocol() << " removed with protocol " << client->GetProtocolName()
<< " on module " << client->GetReflectorModule() << std::endl; << " on module " << client->GetReflectorModule() << std::endl;
delete m_Clients[i]; delete m_Clients[i];
m_Clients.erase(m_Clients.begin()+i); m_Clients.erase(m_Clients.begin()+i);

View File

@ -85,7 +85,7 @@ void CPeers::AddPeer(CPeer *peer)
// append peer to reflector peer list // append peer to reflector peer list
m_Peers.push_back(peer); m_Peers.push_back(peer);
std::cout << "New peer " << peer->GetCallsign() << " at " << peer->GetIp() std::cout << "New peer " << peer->GetCallsign() << " at " << peer->GetIp()
<< " added with protocol " << peer->GetProtocol() << std::endl; << " added with protocol " << peer->GetProtocolName() << std::endl;
// and append all peer's client to reflector client list // and append all peer's client to reflector client list
// it is double lock safe to lock Clients list after Peers list // it is double lock safe to lock Clients list after Peers list
CClients *clients = g_Reflector.GetClients(); CClients *clients = g_Reflector.GetClients();