Manager: the attach_project GUI RPC was using the web RPC URL; it needs to use the master URL

This commit is contained in:
David Anderson 2014-02-19 23:54:52 -08:00
parent 6610f7633b
commit 486ceec90e
1 changed files with 8 additions and 2 deletions

View File

@ -375,7 +375,7 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
SetNextState(ATTACHPROJECT_ACCOUNTQUERY_EXECUTE);
break;
case ATTACHPROJECT_ACCOUNTQUERY_EXECUTE:
// Attempt to create the account or reterieve the authenticator.
// Attempt to create the account or retrieve the authenticator.
ai->clear();
ao->clear();
@ -542,8 +542,14 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
if (pWA->m_bCredentialsCached) {
pDoc->rpc.project_attach_from_file();
} else {
string master_url;
if (!pWA->project_config.master_url.empty()) {
master_url = pWA->project_config.master_url;
} else {
master_url = (const char*)pWA->m_ProjectInfoPage->GetProjectURL().mb_str();
}
pDoc->rpc.project_attach(
ai->url.c_str(),
master_url.c_str(),
ao->authenticator.c_str(),
pWA->project_config.name.c_str()
);