diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-11-13 15:20:57 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-11-13 15:25:44 +0100 |
commit | 8fa0494e9205e1c2151046010cc200c7c9ee022e (patch) | |
tree | 5570e322ec790817e183839de5d35605f7e7a110 | |
parent | ed98a6284b4c2f0be2e128dc7cf59d42eb49046c (diff) | |
download | bitcoin-8fa0494e9205e1c2151046010cc200c7c9ee022e.tar.xz |
Win32: log addresses found in Discover() calls
-rw-r--r-- | src/net.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp index a66875a894..695adeec54 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1567,7 +1567,8 @@ void static Discover(boost::thread_group& threadGroup) { BOOST_FOREACH (const CNetAddr &addr, vaddr) { - AddLocal(addr, LOCAL_IF); + if (AddLocal(addr, LOCAL_IF)) + LogPrintf("%s: %s - %s\n", __func__, pszHostName, addr.ToString()); } } } @@ -1587,20 +1588,19 @@ void static Discover(boost::thread_group& threadGroup) struct sockaddr_in* s4 = (struct sockaddr_in*)(ifa->ifa_addr); CNetAddr addr(s4->sin_addr); if (AddLocal(addr, LOCAL_IF)) - LogPrintf("IPv4 %s: %s\n", ifa->ifa_name, addr.ToString()); + LogPrintf("%s: IPv4 %s: %s\n", __func__, ifa->ifa_name, addr.ToString()); } else if (ifa->ifa_addr->sa_family == AF_INET6) { struct sockaddr_in6* s6 = (struct sockaddr_in6*)(ifa->ifa_addr); CNetAddr addr(s6->sin6_addr); if (AddLocal(addr, LOCAL_IF)) - LogPrintf("IPv6 %s: %s\n", ifa->ifa_name, addr.ToString()); + LogPrintf("%s: IPv6 %s: %s\n", __func__, ifa->ifa_name, addr.ToString()); } } freeifaddrs(myaddrs); } #endif - } void StartNode(boost::thread_group& threadGroup) |