mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=5868
This commit is contained in:
parent
e17f856eeb
commit
a323c4cdf8
|
@ -689,15 +689,7 @@ int GUI_RPC_CONN_SET::init() {
|
|||
if (gstate.allow_remote_gui_rpc || allowed_remote_ip_addresses.size() > 0) {
|
||||
addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
} else {
|
||||
// We need to figure out why when we bind with the loopback adapter and
|
||||
// the client attempts to connect to us through the loopback adapter,
|
||||
// the client fails to connect on *nix platforms.
|
||||
#ifdef _WIN32
|
||||
addr.sin_addr.s_addr = htonl(0x7f000001);
|
||||
#else
|
||||
//addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
addr.sin_addr.s_addr = htonl(0x7f000001);
|
||||
#endif
|
||||
}
|
||||
|
||||
int one = 1;
|
||||
|
|
|
@ -308,13 +308,13 @@ void CBOINCGUIApp::InitSupportedLanguages() {
|
|||
|
||||
|
||||
bool CBOINCGUIApp::IsBOINCCoreRunning() {
|
||||
fprintf(stderr, "CBOINCGUIApp::IsBOINCCoreRunning - Function Begin");
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCGUIApp::IsBOINCCoreRunning - Function Begin"));
|
||||
|
||||
bool retval;
|
||||
RPC_CLIENT rpc;
|
||||
retval = (0 == rpc.init( wxT("localhost") ) );
|
||||
|
||||
fprintf(stderr, "CBOINCGUIApp::IsBOINCCoreRunning - Function End");
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCGUIApp::IsBOINCCoreRunning - Function End"));
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,32 +73,32 @@ void* CNetworkConnection::Poll() {
|
|||
std::string strComputerPassword;
|
||||
|
||||
if (IsReconnecting()) {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - Reconnection Detected");
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - Reconnection Detected"));
|
||||
retval = m_pDocument->rpc.init_poll();
|
||||
if (!retval) {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - init_poll() returned ERR_CONNECT, now authorizing...");
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - init_poll() returned ERR_CONNECT, now authorizing..."));
|
||||
retval = m_pDocument->rpc.authorize(strComputerPassword.c_str());
|
||||
if (!retval) {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - Connection Success");
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - Connection Success"));
|
||||
SetStateSuccess(strComputer, strComputerPassword);
|
||||
} else if (ERR_AUTHENTICATOR == retval) {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - RPC Authorization - ERR_AUTHENTICATOR");
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - RPC Authorization - ERR_AUTHENTICATOR"));
|
||||
SetStateErrorAuthentication();
|
||||
} else {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - RPC Authorization Failed '%d'", retval);
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - RPC Authorization Failed '%d'"), retval);
|
||||
SetStateError();
|
||||
}
|
||||
} else if (ERR_RETRY != retval) {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - RPC Connection Failed '%d'", retval);
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - RPC Connection Failed '%d'"), retval);
|
||||
SetStateError();
|
||||
}
|
||||
} else if (IsConnectEventSignaled() || m_bReconnectOnError) {
|
||||
if ((m_bForceReconnect) ||
|
||||
(!IsConnected() && m_bReconnectOnError)
|
||||
) {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - Resetting Document State");
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - Resetting Document State"));
|
||||
m_pDocument->ResetState();
|
||||
fprintf(stderr, "CNetworkConnection::Poll - Setting connection state to reconnecting");
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - Setting connection state to reconnecting"));
|
||||
SetStateReconnecting();
|
||||
}
|
||||
|
||||
|
@ -121,9 +121,9 @@ void* CNetworkConnection::Poll() {
|
|||
}
|
||||
|
||||
if (!retval) {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - RPC Initialization Called");
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - RPC Initialization Called"));
|
||||
} else {
|
||||
fprintf(stderr, "CNetworkConnection::Poll - RPC Initialization Failed '%d'", retval);
|
||||
wxLogTrace(wxT("CNetworkConnection::Poll - RPC Initialization Failed '%d'"), retval);
|
||||
SetStateError();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1169,7 +1169,7 @@ void CMainFrame::OnConnectErrorAuthentication(CMainFrameEvent&) {
|
|||
|
||||
|
||||
void CMainFrame::OnInitialized(CMainFrameEvent&) {
|
||||
fprintf(stderr, "CMainFrame::OnInitialized - Function Begin");
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnInitialized - Function Begin"));
|
||||
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
|
@ -1179,7 +1179,7 @@ void CMainFrame::OnInitialized(CMainFrameEvent&) {
|
|||
if (!pDoc->IsConnected())
|
||||
pDoc->Connect(wxEmptyString, wxEmptyString, TRUE);
|
||||
|
||||
fprintf(stderr, "CMainFrame::OnInitialized - Function End");
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnInitialized - Function End"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1373,14 +1373,12 @@ void CMainFrame::OnListPanelRender(wxTimerEvent&) {
|
|||
|
||||
|
||||
void CMainFrame::OnDocumentPoll(wxTimerEvent& /*event*/) {
|
||||
fprintf(stderr, "CMainFrame::OnDocumentPoll - Function Begin");
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
wxASSERT(pDoc);
|
||||
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
||||
|
||||
pDoc->OnPoll();
|
||||
fprintf(stderr, "CMainFrame::OnDocumentPoll - Function End");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -935,7 +935,7 @@ RPC_CLIENT::~RPC_CLIENT() {
|
|||
// call this and then call init() again.
|
||||
//
|
||||
void RPC_CLIENT::close() {
|
||||
fprintf(stderr, "RPC_CLIENT::close called\n");
|
||||
//fprintf(stderr, "RPC_CLIENT::close called\n");
|
||||
#ifdef _WIN32
|
||||
::closesocket(sock);
|
||||
#else
|
||||
|
@ -957,19 +957,11 @@ int RPC_CLIENT::init(const char* host, bool asynch) {
|
|||
}
|
||||
addr.sin_addr.s_addr = *(int*)hep->h_addr_list[0];
|
||||
} else {
|
||||
// We need to figure out why when the server binds with the loopback adapter
|
||||
// and the client attempts to connect to the server through the loopback
|
||||
// adapter, the client fails to connect on *nix platforms.
|
||||
#ifdef _WIN32
|
||||
addr.sin_addr.s_addr = htonl(0x7f000001);
|
||||
#else
|
||||
//addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
addr.sin_addr.s_addr = htonl(0x7f000001);
|
||||
#endif
|
||||
}
|
||||
|
||||
retval = boinc_socket(sock);
|
||||
fprintf(stderr, "RPC_CLIENT::init boinc_socket returned %d\n", sock);
|
||||
//fprintf(stderr, "RPC_CLIENT::init boinc_socket returned %d\n", sock);
|
||||
if (retval) return retval;
|
||||
|
||||
if (asynch) {
|
||||
|
@ -980,9 +972,10 @@ int RPC_CLIENT::init(const char* host, bool asynch) {
|
|||
}
|
||||
retval = connect(sock, (const sockaddr*)(&addr), sizeof(addr));
|
||||
if (retval) {
|
||||
fprintf(stderr, "connect returned %d\n", retval);
|
||||
perror("connect");
|
||||
//fprintf(stderr, "connect returned %d\n", retval);
|
||||
}
|
||||
fprintf(stderr, "attempting connect to alt port\n");
|
||||
//fprintf(stderr, "attempting connect to alt port\n");
|
||||
} else {
|
||||
retval = connect(sock, (const sockaddr*)(&addr), sizeof(addr));
|
||||
if (retval) {
|
||||
|
@ -1017,7 +1010,7 @@ int RPC_CLIENT::init_poll() {
|
|||
FD_SET(sock, &write_fds);
|
||||
FD_SET(sock, &error_fds);
|
||||
|
||||
fprintf(stderr, "RPC_CLIENT::init_poll sock = %d\n", sock);
|
||||
//fprintf(stderr, "RPC_CLIENT::init_poll sock = %d\n", sock);
|
||||
|
||||
tv.tv_sec = tv.tv_usec = 0;
|
||||
select(FD_SETSIZE, &read_fds, &write_fds, &error_fds, &tv);
|
||||
|
@ -1027,7 +1020,7 @@ int RPC_CLIENT::init_poll() {
|
|||
} else if (FD_ISSET(sock, &write_fds)) {
|
||||
retval = get_socket_error(sock);
|
||||
if (!retval) {
|
||||
fprintf(stderr, "Connected to port %d\n", ntohs(addr.sin_port));
|
||||
//fprintf(stderr, "Connected to port %d\n", ntohs(addr.sin_port));
|
||||
retval = boinc_socket_asynch(sock, false);
|
||||
if (retval) {
|
||||
fprintf(stderr, "asynch error: %d\n", retval);
|
||||
|
@ -1140,7 +1133,7 @@ RPC::~RPC() {
|
|||
int RPC::do_rpc(const char* req) {
|
||||
int retval;
|
||||
|
||||
fprintf(stderr, "RPC::do_rpc rpc_client->sock = '%d'", rpc_client->sock);
|
||||
//fprintf(stderr, "RPC::do_rpc rpc_client->sock = '%d'", rpc_client->sock);
|
||||
if (rpc_client->sock == 0) return ERR_CONNECT;
|
||||
#ifdef DEBUG
|
||||
puts(req);
|
||||
|
|
Loading…
Reference in New Issue