@@ -1559,15 +1559,16 @@ void static Discover(boost::thread_group& threadGroup)
1559
1559
1560
1560
#ifdef WIN32
1561
1561
// Get local host IP
1562
- char pszHostName[1000 ] = " " ;
1562
+ char pszHostName[256 ] = " " ;
1563
1563
if (gethostname (pszHostName, sizeof (pszHostName)) != SOCKET_ERROR)
1564
1564
{
1565
1565
vector<CNetAddr> vaddr;
1566
1566
if (LookupHost (pszHostName, vaddr))
1567
1567
{
1568
1568
BOOST_FOREACH (const CNetAddr &addr, vaddr)
1569
1569
{
1570
- AddLocal (addr, LOCAL_IF);
1570
+ if (AddLocal (addr, LOCAL_IF))
1571
+ LogPrintf (" %s: %s - %s\n " , __func__, pszHostName, addr.ToString ());
1571
1572
}
1572
1573
}
1573
1574
}
@@ -1587,20 +1588,19 @@ void static Discover(boost::thread_group& threadGroup)
1587
1588
struct sockaddr_in * s4 = (struct sockaddr_in *)(ifa->ifa_addr );
1588
1589
CNetAddr addr (s4->sin_addr );
1589
1590
if (AddLocal (addr, LOCAL_IF))
1590
- LogPrintf (" IPv4 %s: %s\n " , ifa->ifa_name , addr.ToString ());
1591
+ LogPrintf (" %s: IPv4 %s: %s\n " , __func__ , ifa->ifa_name , addr.ToString ());
1591
1592
}
1592
1593
else if (ifa->ifa_addr ->sa_family == AF_INET6)
1593
1594
{
1594
1595
struct sockaddr_in6 * s6 = (struct sockaddr_in6 *)(ifa->ifa_addr );
1595
1596
CNetAddr addr (s6->sin6_addr );
1596
1597
if (AddLocal (addr, LOCAL_IF))
1597
- LogPrintf (" IPv6 %s: %s\n " , ifa->ifa_name , addr.ToString ());
1598
+ LogPrintf (" %s: IPv6 %s: %s\n " , __func__ , ifa->ifa_name , addr.ToString ());
1598
1599
}
1599
1600
}
1600
1601
freeifaddrs (myaddrs);
1601
1602
}
1602
1603
#endif
1603
-
1604
1604
}
1605
1605
1606
1606
void StartNode (boost::thread_group& threadGroup)
0 commit comments