From 79b7ef3300547caa9df3bdca0f829a8207690289 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Sun, 30 Apr 2017 15:04:40 +0200 Subject: [PATCH] Lowered debug level of socket address comparisons --- lib/socket.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/socket.cpp b/lib/socket.cpp index 61ba79e4..47293c8e 100644 --- a/lib/socket.cpp +++ b/lib/socket.cpp @@ -661,13 +661,13 @@ bool Socket::Connection::isAddress(std::string addr){ newaddr[0] = 0; for (rp = result; rp != NULL; rp = rp->ai_next){ if (rp->ai_family == AF_INET && inet_ntop(rp->ai_family, &(((sockaddr_in *)rp->ai_addr)->sin_addr), newaddr, INET6_ADDRSTRLEN)){ - INFO_MSG("Comparing '%s' to '%s'", remotehost.c_str(), newaddr); + INSANE_MSG("Comparing '%s' to '%s'", remotehost.c_str(), newaddr); if (remotehost == newaddr){return true;} - INFO_MSG("Comparing '%s' to '::ffff:%s'", remotehost.c_str(), newaddr); + INSANE_MSG("Comparing '%s' to '::ffff:%s'", remotehost.c_str(), newaddr); if (remotehost == std::string("::ffff:") + newaddr){return true;} } if (rp->ai_family == AF_INET6 && inet_ntop(rp->ai_family, &(((sockaddr_in6 *)rp->ai_addr)->sin6_addr), newaddr, INET6_ADDRSTRLEN)){ - INFO_MSG("Comparing '%s' to '%s'", remotehost.c_str(), newaddr); + INSANE_MSG("Comparing '%s' to '%s'", remotehost.c_str(), newaddr); if (remotehost == newaddr){return true;} } } @@ -690,14 +690,14 @@ bool Socket::Connection::isLocal(){ if (ifa->ifa_addr->sa_family == AF_INET) { // check it is IP4 tmpAddrPtr=&((struct sockaddr_in *)ifa->ifa_addr)->sin_addr; inet_ntop(AF_INET, tmpAddrPtr, addressBuffer, INET_ADDRSTRLEN); - INFO_MSG("Comparing '%s' to '%s'", remotehost.c_str(), addressBuffer); + INSANE_MSG("Comparing '%s' to '%s'", remotehost.c_str(), addressBuffer); if (remotehost == addressBuffer){return true;} - INFO_MSG("Comparing '%s' to '::ffff:%s'", remotehost.c_str(), addressBuffer); + INSANE_MSG("Comparing '%s' to '::ffff:%s'", remotehost.c_str(), addressBuffer); if (remotehost == std::string("::ffff:") + addressBuffer){return true;} } else if (ifa->ifa_addr->sa_family == AF_INET6) { // check it is IP6 tmpAddrPtr=&((struct sockaddr_in6 *)ifa->ifa_addr)->sin6_addr; inet_ntop(AF_INET6, tmpAddrPtr, addressBuffer, INET6_ADDRSTRLEN); - INFO_MSG("Comparing '%s' to '%s'", remotehost.c_str(), addressBuffer); + INSANE_MSG("Comparing '%s' to '%s'", remotehost.c_str(), addressBuffer); if (remotehost == addressBuffer){return true;} } }