From 45241fdaa0c56abda333f7d9bb2c531f2f85f217 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Thu, 29 Mar 2018 08:35:19 -0700 Subject: [PATCH] better portmap[] log messages --- g2_ircddb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g2_ircddb.cpp b/g2_ircddb.cpp index d55f784..de2e5a8 100644 --- a/g2_ircddb.cpp +++ b/g2_ircddb.cpp @@ -796,8 +796,8 @@ void CG2_ircddb::process() if (portmap.end() == portmap.find(fromDst4.sin_addr.s_addr)) traceit("New g2 contact at %s on port %u\n", inet_ntoa(fromDst4.sin_addr), ntohs(fromDst4.sin_port)); else { - if (fromDst4.sin_port != portmap[fromDst4.sin_addr.s_addr]) - traceit("New g2 port from %s is now %u\n", inet_ntoa(fromDst4.sin_addr), ntohs(fromDst4.sin_port)); + if (ntohs(fromDst4.sin_port) != portmap[fromDst4.sin_addr.s_addr]) + traceit("New g2 port from %s is now %u, it was %u\n", inet_ntoa(fromDst4.sin_addr), ntohs(fromDst4.sin_port), portmap[fromDst4.sin_addr.s_addr]); } portmap[fromDst4.sin_addr.s_addr] = ntohs(fromDst4.sin_port);