diff --git a/src/cclient.cpp b/src/cclient.cpp index eb60948..2b249f5 100644 --- a/src/cclient.cpp +++ b/src/cclient.cpp @@ -77,6 +77,7 @@ bool CClient::operator ==(const CClient &client) const { return ((client.m_Callsign == m_Callsign) && (client.m_Ip == m_Ip) && + (client.m_Ip.GetPort() == m_Ip.GetPort()) && (client.m_ReflectorModule == m_ReflectorModule)); } diff --git a/src/cclients.cpp b/src/cclients.cpp index f41f25d..61cc9fd 100644 --- a/src/cclients.cpp +++ b/src/cclients.cpp @@ -122,7 +122,8 @@ std::shared_ptr CClients::FindClient(const CIp &Ip) // find client for ( auto it=begin(); it!=end(); it++ ) { - if ( (*it)->GetIp() == Ip ) + // check the port too to allow multiple clients from the same ip + if ( ((*it)->GetIp() == Ip) && ((*it)->GetIp().GetPort() == Ip.GetPort()) ) { return *it; }