From 3b98f7b7f79a61f300c458c6cd908de9d93281bb Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 17 Oct 2016 17:53:57 +0100 Subject: [PATCH] Show IP address and ports in the reflector. --- YSFReflector/YSFReflector.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YSFReflector/YSFReflector.cpp b/YSFReflector/YSFReflector.cpp index 103e7ed..cefec6d 100644 --- a/YSFReflector/YSFReflector.cpp +++ b/YSFReflector/YSFReflector.cpp @@ -200,12 +200,12 @@ void CYSFReflector::run() rpt->m_port = port; m_repeaters.push_back(rpt); network.setCount(m_repeaters.size()); - LogMessage("Adding %s", rpt->m_callsign.c_str()); + LogMessage("Adding %s (%s:%u)", rpt->m_callsign.c_str(), ::inet_ntoa(address), port); } rpt->m_timer.start(); network.writePoll(address, port); } else if (::memcmp(buffer + 0U, "YSFU", 4U) == 0 && rpt != NULL) { - LogMessage("Removing %s (unlinked)", rpt->m_callsign.c_str()); + LogMessage("Removing %s (%s:%u) unlinked", rpt->m_callsign.c_str(), ::inet_ntoa(address), port); for (std::vector::iterator it = m_repeaters.begin(); it != m_repeaters.end(); ++it) { CYSFRepeater* itRpt = *it; if (itRpt->m_address.s_addr == rpt->m_address.s_addr && itRpt->m_port == rpt->m_port) { @@ -280,7 +280,7 @@ void CYSFReflector::run() for (std::vector::iterator it = m_repeaters.begin(); it != m_repeaters.end(); ++it) { CYSFRepeater* itRpt = *it; if (itRpt->m_timer.hasExpired()) { - LogMessage("Removing %s (polls lost)", itRpt->m_callsign.c_str()); + LogMessage("Removing %s (%s:%u) disappeared", itRpt->m_callsign.c_str(), ::inet_ntoa(address), port); m_repeaters.erase(it); delete itRpt; network.setCount(m_repeaters.size());