aboutsummaryrefslogtreecommitdiff
path: root/ui.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-18 19:19:41 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-18 19:19:41 +0000
commitc5c7911dab8732861affbe66849a100da62f7464 (patch)
treebfbb16bc8fbcb4911a24a5e32f9f4c3c280f392c /ui.cpp
parentb349e3dca89dfff5fe70669f9fd3f3a1ec60a498 (diff)
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
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/ui.cpp b/ui.cpp
index 9d7556cb57..aaa26adf00 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -1664,7 +1664,7 @@ void COptionsDialog::OnButtonApply(wxCommandEvent& event)
CAboutDialog::CAboutDialog(wxWindow* parent) : CAboutDialogBase(parent)
{
- m_staticTextVersion->SetLabel(strprintf("version 0.%d.%d Beta", VERSION/100, VERSION%100));
+ m_staticTextVersion->SetLabel(strprintf("version 0.%d.%d beta", VERSION/100, VERSION%100));
// Workaround until upgrade to wxWidgets supporting UTF-8
wxString str = m_staticTextMain->GetLabel();
@@ -2030,7 +2030,7 @@ void CSendingDialog::StartTransfer()
// We may have connected already for product details
if (!Status("Connecting..."))
return;
- CNode* pnode = ConnectNode(addr, 5 * 60);
+ CNode* pnode = ConnectNode(addr, 15 * 60);
if (!pnode)
{
Error("Unable to connect");
@@ -2075,14 +2075,6 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
return;
}
- // Should already be connected
- CNode* pnode = ConnectNode(addr, 5 * 60);
- if (!pnode)
- {
- Error("Lost connection");
- return;
- }
-
// Pause to give the user a chance to cancel
while (wxDateTime::UNow() < start + wxTimeSpan(0, 0, 0, 2 * 1000))
{
@@ -2112,6 +2104,14 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
return;
}
+ // Make sure we're still connected
+ CNode* pnode = ConnectNode(addr, 2 * 60 * 60);
+ if (!pnode)
+ {
+ Error("Lost connection, transaction cancelled");
+ return;
+ }
+
// Last chance to cancel
Sleep(50);
if (!Status())
@@ -3495,12 +3495,14 @@ bool CMyApp::OnInit2()
if (mapArgs.count("-debug"))
fDebug = true;
+ if (strstr(pszSubVer, "test"))
+ fDebug = true;
if (mapArgs.count("-printtodebugger"))
fPrintToDebugger = true;
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
- printf("Bitcoin version %d, OS version %s\n", VERSION, wxGetOsDescription().mb_str());
+ printf("Bitcoin version %d%s, OS version %s\n", VERSION, pszSubVer, wxGetOsDescription().mb_str());
if (mapArgs.count("-loadblockindextest"))
{
@@ -3843,9 +3845,8 @@ void SetStartOnSystemStartup(bool fAutoStart)
CoInitialize(NULL);
// Get a pointer to the IShellLink interface.
- HRESULT hres = NULL;
IShellLink* psl = NULL;
- hres = CoCreateInstance(CLSID_ShellLink, NULL,
+ HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER, IID_IShellLink,
reinterpret_cast<void**>(&psl));