#include "db.h"
#include "net.h"
#include "init.h"
-#include "strlcpy.h"
#include "addrman.h"
#include "ui_interface.h"
bool GetMyExternalIP(CNetAddr& ipRet)
{
struct sockaddr_in mapped;
- uint64_t rnd = GetRand(~0LL);
+ uint64_t rnd = UINT64_MAX;
const char *srv;
int rc = GetExternalIPbySTUN(rnd, &mapped, &srv);
if(rc >= 0) {
printf("ThreadSocketHandler exited\n");
}
+static list<CNode*> vNodesDisconnected;
+
void ThreadSocketHandler2(void* parg)
{
printf("ThreadSocketHandler started\n");
- list<CNode*> vNodesDisconnected;
unsigned int nPrevNodeCount = 0;
-
while (true)
{
//
// The second name should resolve to a list of seed addresses.
static const char *strDNSSeed[][2] = {
{"novacoin.karelia.pro", "dnsseed.novacoin.karelia.pro"},
- {"novacoin.su", "dnsseed.novacoin.su"},
{"novacoin.ru", "dnsseed.novacoin.ru"},
{"novacoin.ru", "testseed.novacoin.ru"},
{"novaco.in", "dnsseed.novaco.in"},
void ThreadDumpAddress2(void* parg)
{
+ printf("ThreadDumpAddress started\n");
+
vnThreadsRunning[THREAD_DUMPADDRESS]++;
while (!fShutdown)
{
Sleep(20);
Sleep(50);
DumpAddresses();
+
return true;
}
if (closesocket(hListenSocket) == SOCKET_ERROR)
printf("closesocket(hListenSocket) failed with error %d\n", WSAGetLastError());
+ // clean up some globals (to help leak detection)
+ BOOST_FOREACH(CNode *pnode, vNodes)
+ delete pnode;
+ BOOST_FOREACH(CNode *pnode, vNodesDisconnected)
+ delete pnode;
+ vNodes.clear();
+ vNodesDisconnected.clear();
+ delete semOutbound;
+ semOutbound = NULL;
+ delete pnodeLocalHost;
+ pnodeLocalHost = NULL;
+
#ifdef WIN32
// Shutdown Windows Sockets
WSACleanup();