From 4d2e6a041f5b57d90e9853cd3d94f869f32774f5 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 10 Feb 2016 10:46:48 -0500 Subject: [PATCH] MGR: Fix for converting std::string to wxString for Mac and Linux. MGR: Add missing commit from previous merge for the cookieless install scenario. --- client/gui_rpc_server_ops.cpp | 2 ++ clientgui/AdvancedFrame.cpp | 7 ++++--- clientgui/sg_BoincSimpleFrame.cpp | 5 +++-- lib/gui_rpc_client.h | 1 + lib/gui_rpc_client_ops.cpp | 5 +++++ 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/client/gui_rpc_server_ops.cpp b/client/gui_rpc_server_ops.cpp index 195ae3c3c9..8d77cae3b1 100644 --- a/client/gui_rpc_server_ops.cpp +++ b/client/gui_rpc_server_ops.cpp @@ -732,12 +732,14 @@ static void handle_get_project_init_status(GUI_RPC_CONN& grc) { " %s\n" " %s\n" " %s\n" + " %s\n" " %s\n" " %s\n" "\n", gstate.project_init.url, gstate.project_init.name, gstate.project_init.team_name, + gstate.project_init.setup_cookie, strlen(gstate.project_init.account_key)?"":"", gstate.project_init.embedded?"":"" ); diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index ea42177cd1..d079772a86 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -1888,8 +1888,9 @@ void CAdvancedFrame::OnConnect(CFrameEvent& WXUNUSED(event)) { } else if ((0 >= pDoc->GetProjectCount()) && !status.disallow_attach) { if (pis.url.size() > 0) { - strProjectName = pis.name; - strProjectURL = pis.url; + strProjectName = pis.name.c_str(); + strProjectURL = pis.url.c_str(); + strProjectSetupCookie = pis.setup_cookie.c_str(); bAccountKeyDetected = pis.has_account_key; bEmbedded = pis.embedded; @@ -1912,7 +1913,7 @@ void CAdvancedFrame::OnConnect(CFrameEvent& WXUNUSED(event)) { pWizard = new CWizardAttach(this); if ( strProjectURL.size() && - (strProjectAuthenticator.size() || strProjectSetupCookie.size()) && + //(strProjectAuthenticator.size() || strProjectSetupCookie.size()) && !pDoc->project((char*)strProjectURL.c_str()) ){ if (pWizard->Run( diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp index 34d8e69865..da24aa4b99 100755 --- a/clientgui/sg_BoincSimpleFrame.cpp +++ b/clientgui/sg_BoincSimpleFrame.cpp @@ -813,8 +813,9 @@ void CSimpleFrame::OnConnect(CFrameEvent& WXUNUSED(event)) { } else if ((0 >= pDoc->GetProjectCount()) && !status.disallow_attach) { if (pis.url.size() > 0) { - strProjectName = pis.name; - strProjectURL = pis.url; + strProjectName = pis.name.c_str(); + strProjectURL = pis.url.c_str(); + strProjectSetupCookie = pis.setup_cookie.c_str(); bAccountKeyDetected = pis.has_account_key; bEmbedded = pis.embedded; diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h index fbe78e37df..69ccbc0616 100644 --- a/lib/gui_rpc_client.h +++ b/lib/gui_rpc_client.h @@ -514,6 +514,7 @@ struct PROJECT_INIT_STATUS { std::string url; std::string name; std::string team_name; + std::string setup_cookie; bool has_account_key; bool embedded; diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp index bca23d6780..eebed41e81 100644 --- a/lib/gui_rpc_client_ops.cpp +++ b/lib/gui_rpc_client_ops.cpp @@ -1263,7 +1263,9 @@ int PROJECT_INIT_STATUS::parse(XML_PARSER& xp) { if (xp.parse_string("url", url)) continue; if (xp.parse_string("name", name)) continue; if (xp.parse_string("team_name", team_name)) continue; + if (xp.parse_string("setup_cookie", setup_cookie)) continue; if (xp.parse_bool("has_account_key", has_account_key)) continue; + if (xp.parse_bool("embedded", embedded)) continue; } return ERR_XML_PARSE; } @@ -1271,7 +1273,10 @@ int PROJECT_INIT_STATUS::parse(XML_PARSER& xp) { void PROJECT_INIT_STATUS::clear() { url.clear(); name.clear(); + team_name.clear(); + setup_cookie.clear(); has_account_key = false; + embedded = false; } PROJECT_CONFIG::PROJECT_CONFIG() {