From 910bd45756dda126465cfdf13b4833e0356808ff Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Sun, 14 Nov 2010 00:06:10 +0000 Subject: [PATCH 1/3] -- version 0.3.15 release git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@179 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- serialize.h | 2 +- setup.nsi | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/serialize.h b/serialize.h index 7b7ab840d..9b163d33f 100644 --- a/serialize.h +++ b/serialize.h @@ -22,7 +22,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int VERSION = 31403; +static const int VERSION = 31500; static const char* pszSubVer = ""; diff --git a/setup.nsi b/setup.nsi index 5873b075c..e999b6e1a 100644 --- a/setup.nsi +++ b/setup.nsi @@ -7,7 +7,7 @@ RequestExecutionLevel highest # General Symbol Definitions !define REGKEY "SOFTWARE\$(^Name)" -!define VERSION 0.3.14 +!define VERSION 0.3.15 !define COMPANY "Bitcoin project" !define URL http://www.bitcoin.org/ @@ -42,12 +42,12 @@ Var StartMenuGroup !insertmacro MUI_LANGUAGE English # Installer attributes -OutFile bitcoin-0.3.14-win32-setup.exe +OutFile bitcoin-0.3.15-win32-setup.exe InstallDir $PROGRAMFILES\Bitcoin CRCCheck on XPStyle on ShowInstDetails show -VIProductVersion 0.3.14.0 +VIProductVersion 0.3.15.0 VIAddVersionKey ProductName Bitcoin VIAddVersionKey ProductVersion "${VERSION}" VIAddVersionKey CompanyName "${COMPANY}" From 222e3de4be2e7037b82112867bb48a9e8cb36918 Mon Sep 17 00:00:00 2001 From: gavinandresen Date: Mon, 15 Nov 2010 21:37:33 +0000 Subject: [PATCH 2/3] Update websites used for GetMyExternalIP git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@180 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- net.cpp | 18 ++++++++++-------- serialize.h | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/net.cpp b/net.cpp index 3890a7afc..7cc21be39 100644 --- a/net.cpp +++ b/net.cpp @@ -128,7 +128,7 @@ bool GetMyExternalIP2(const CAddress& addrConnect, const char* pszGet, const cha string strLine; while (RecvLine(hSocket, strLine)) { - if (strLine.empty()) + if (strLine.empty()) // HTTP response is separated from headers by blank line { loop { @@ -137,6 +137,8 @@ bool GetMyExternalIP2(const CAddress& addrConnect, const char* pszGet, const cha closesocket(hSocket); return false; } + if (pszKeyword == NULL) + break; if (strLine.find(pszKeyword) != -1) { strLine = strLine.substr(strLine.find(pszKeyword) + strlen(pszKeyword)); @@ -176,26 +178,26 @@ bool GetMyExternalIP(unsigned int& ipRet) { if (nHost == 1) { - addrConnect = CAddress("70.86.96.218:80"); // www.ipaddressworld.com + addrConnect = CAddress("72.233.89.199:80"); // www.whatismyip.com if (nLookup == 1) { - struct hostent* phostent = gethostbyname("www.ipaddressworld.com"); + struct hostent* phostent = gethostbyname("www.whatismyip.com"); if (phostent && phostent->h_addr_list && phostent->h_addr_list[0]) addrConnect = CAddress(*(u_long*)phostent->h_addr_list[0], htons(80)); } - pszGet = "GET /ip.php HTTP/1.1\r\n" - "Host: www.ipaddressworld.com\r\n" - "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n" + pszGet = "GET /automation/n09230945.asp HTTP/1.1\r\n" + "Host: www.whatismyip.com\r\n" + "User-Agent: Bitcoin/1.0 (see www.bitcoin.org)\r\n" "Connection: close\r\n" "\r\n"; - pszKeyword = "IP:"; + pszKeyword = NULL; // Returns just IP address } else if (nHost == 2) { - addrConnect = CAddress("208.78.68.70:80"); // checkip.dyndns.org + addrConnect = CAddress("91.198.22.70:80"); // checkip.dyndns.org if (nLookup == 1) { diff --git a/serialize.h b/serialize.h index 9b163d33f..43122078d 100644 --- a/serialize.h +++ b/serialize.h @@ -22,7 +22,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int VERSION = 31500; +static const int VERSION = 31501; static const char* pszSubVer = ""; From 026c5f7617a1a8753ff295a4b5cc1c079e8c3d79 Mon Sep 17 00:00:00 2001 From: gavinandresen Date: Tue, 16 Nov 2010 02:32:36 +0000 Subject: [PATCH 3/3] Re-open debug.log every ten minutes instead of every printf; fixes performance problem with Mac FileVault. git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@181 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- util.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/util.cpp b/util.cpp index b7840841d..5ba0fb510 100644 --- a/util.cpp +++ b/util.cpp @@ -157,10 +157,19 @@ inline int OutputDebugStringF(const char* pszFormat, ...) else { // print to debug.log - char pszFile[MAX_PATH+100]; - GetDataDir(pszFile); - strlcat(pszFile, "/debug.log", sizeof(pszFile)); - FILE* fileout = fopen(pszFile, "a"); + static FILE* fileout = NULL; + static int64 nOpenTime = 0; + + if (GetTime()-nOpenTime > 10 * 60) + { + if (fileout) + fclose(fileout); + char pszFile[MAX_PATH+100]; + GetDataDir(pszFile); + strlcat(pszFile, "/debug.log", sizeof(pszFile)); + fileout = fopen(pszFile, "a"); + nOpenTime = GetTime(); + } if (fileout) { //// Debug print useful for profiling @@ -169,7 +178,7 @@ inline int OutputDebugStringF(const char* pszFormat, ...) va_start(arg_ptr, pszFormat); ret = vfprintf(fileout, pszFormat, arg_ptr); va_end(arg_ptr); - fclose(fileout); + fflush(fileout); } }