diff --git a/checkin_notes b/checkin_notes index 1aa5bd65da..da47ad1ac7 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13921,3 +13921,11 @@ Rom 25 Nov 2005 client/ gui_rpc_server.C, .h + +Rom 25 Nov 2005 + - Bug Fix: Somewhere along the lines we broke the automatic swapping + of ports and waiting until the timeout period to stop so that + people had time to handle the firewall prompts. + + client/ + MainDocument.cpp diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 56bf910a9a..689ba22274 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -115,7 +115,10 @@ void* CNetworkConnection::Poll() { } } - if (strComputer.empty()) { + // a host value of NULL is special cased as binding to the localhost and + // if we are connecting to the localhost we need to retry the connection + // for awhile so that the users can respond to firewall prompts. + if (strComputer.empty() || (strComputer == _T("localhost"))) { retval = m_pDocument->rpc.init_asynch(NULL, 60., true); } else { retval = m_pDocument->rpc.init_asynch(strComputer.c_str(), 60., false); diff --git a/lib/diagnostics.h b/lib/diagnostics.h index 90ef35d098..38160c6cee 100644 --- a/lib/diagnostics.h +++ b/lib/diagnostics.h @@ -112,8 +112,8 @@ extern void boinc_info_release(const char *pszFormat, ...); // wxWidgets UI Framework // -#define BOINCASSERT(expr) __noop -#define BOINCTRACE __noop +#define BOINCASSERT(expr) wxASSERT(expr) +#define BOINCTRACE wxLogDebug #define BOINCINFO boinc_info_release #elif defined(_CONSOLE) diff --git a/lib/gui_rpc_client.C b/lib/gui_rpc_client.C index 03dfdb41ba..f7c2faaef5 100644 --- a/lib/gui_rpc_client.C +++ b/lib/gui_rpc_client.C @@ -171,21 +171,21 @@ int RPC_CLIENT::init_poll() { BOINCTRACE("RPC_CLIENT::init_poll connected to port %d\n", ntohs(addr.sin_port)); retval = boinc_socket_asynch(sock, false); if (retval) { - fprintf(stderr, "asynch error: %d\n", retval); + BOINCTRACE("asynch error: %d\n", retval); return retval; } return 0; } else { - fprintf(stderr, "init_poll: get_socket_error(): %d\n", retval); + BOINCTRACE("init_poll: get_socket_error(): %d\n", retval); } } if (dtime() > start_time + timeout) { - fprintf(stderr, "RPC_CLIENT init timed out\n"); + BOINCTRACE("RPC_CLIENT init timed out\n"); return ERR_CONNECT; } if (retval) { if (!retry && tried_alt_port) { - fprintf(stderr, "already tried both ports, giving up\n"); + BOINCTRACE("already tried both ports, giving up\n"); return ERR_CONNECT; } else { boinc_close_socket(sock);