mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
bugfix Db::open/close and zombie sockets bugs fix double-close of socket handle,
keep databases open, close db cursors, initial block download in batches of 500 blocks, fix misc warnings, subver linux-test8 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@40 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
10
util.cpp
10
util.cpp
@@ -56,9 +56,11 @@ public:
|
||||
|
||||
// Close sockets
|
||||
foreach(CNode* pnode, vNodes)
|
||||
closesocket(pnode->hSocket);
|
||||
if (closesocket(hListenSocket) == SOCKET_ERROR)
|
||||
printf("closesocket(hListenSocket) failed with error %d\n", WSAGetLastError());
|
||||
if (pnode->hSocket != INVALID_SOCKET)
|
||||
closesocket(pnode->hSocket);
|
||||
if (hListenSocket != INVALID_SOCKET)
|
||||
if (closesocket(hListenSocket) == SOCKET_ERROR)
|
||||
printf("closesocket(hListenSocket) failed with error %d\n", WSAGetLastError());
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Shutdown Windows Sockets
|
||||
@@ -348,7 +350,7 @@ void ParseParameters(int argc, char* argv[])
|
||||
{
|
||||
char psz[10000];
|
||||
strlcpy(psz, argv[i], sizeof(psz));
|
||||
char* pszValue = "";
|
||||
char* pszValue = (char*)"";
|
||||
if (strchr(psz, '='))
|
||||
{
|
||||
pszValue = strchr(psz, '=');
|
||||
|
||||
Reference in New Issue
Block a user