mirror of https://github.com/BOINC/boinc.git
- MGR: Expand on Charlie's last checkin to include the rest of the polling
RPCs in the wizard. The polling RPCs would return ERR_RETRY when the CC was in the middle of some other GUI_HTTP op (version check, project list download). clientgui/ AccountManagerProcessingPage.cpp AccountManagerPropertiesPage.cpp ProjectProcessingPage.cpp ProjectPropertiesPage.cpp svn path=/trunk/boinc/; revision=18410
This commit is contained in:
parent
734db62fb4
commit
5d6142863e
|
@ -5626,3 +5626,15 @@ Rom 13 June 2009
|
|||
browser.cpp
|
||||
lib/
|
||||
miofile.cpp, .h
|
||||
|
||||
Rom 13 June 2009
|
||||
- MGR: Expand on Charlie's last checkin to include the rest of the polling
|
||||
RPCs in the wizard. The polling RPCs would return ERR_RETRY when
|
||||
the CC was in the middle of some other GUI_HTTP op (version check,
|
||||
project list download).
|
||||
|
||||
clientgui/
|
||||
AccountManagerProcessingPage.cpp
|
||||
AccountManagerPropertiesPage.cpp
|
||||
ProjectProcessingPage.cpp
|
||||
ProjectPropertiesPage.cpp
|
||||
|
|
|
@ -269,26 +269,19 @@ void CAccountManagerProcessingPage::OnStateChange( CAccountManagerProcessingPage
|
|||
|
||||
username = (const char*)pWAP->m_AccountInfoPage->GetAccountEmailAddress().mb_str();
|
||||
password = (const char*)pWAP->m_AccountInfoPage->GetAccountPassword().mb_str();
|
||||
pDoc->rpc.acct_mgr_rpc(
|
||||
url.c_str(),
|
||||
username.c_str(),
|
||||
password.c_str(),
|
||||
pWAP->m_bCredentialsCached
|
||||
);
|
||||
|
||||
// Wait until we are done processing the request.
|
||||
dtStartExecutionTime = wxDateTime::Now();
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = 0;
|
||||
reply.error_num = ERR_IN_PROGRESS;
|
||||
while (!iReturnValue &&
|
||||
((ERR_IN_PROGRESS == reply.error_num) ||
|
||||
(ERR_RETRY == reply.error_num)) &&
|
||||
reply.error_num = ERR_RETRY;
|
||||
while (
|
||||
!iReturnValue &&
|
||||
((ERR_IN_PROGRESS == reply.error_num) || (ERR_RETRY == reply.error_num)) &&
|
||||
(tsExecutionTime.GetSeconds() <= 60) &&
|
||||
!CHECK_CLOSINGINPROGRESS()
|
||||
)
|
||||
{
|
||||
) {
|
||||
if (ERR_RETRY == reply.error_num) {
|
||||
pDoc->rpc.acct_mgr_rpc(
|
||||
url.c_str(),
|
||||
|
|
|
@ -261,9 +261,6 @@ void CAccountManagerPropertiesPage::OnStateChange( CAccountManagerPropertiesPage
|
|||
break;
|
||||
case ACCTMGRPROP_RETRPROJECTPROPERTIES_EXECUTE:
|
||||
// Attempt to retrieve the project's account creation policies
|
||||
pDoc->rpc.get_project_config(
|
||||
(const char*)pWAP->m_AccountManagerInfoPage->GetProjectURL().mb_str()
|
||||
);
|
||||
|
||||
// Wait until we are done processing the request.
|
||||
dtStartExecutionTime = wxDateTime::Now();
|
||||
|
@ -271,12 +268,19 @@ void CAccountManagerPropertiesPage::OnStateChange( CAccountManagerPropertiesPage
|
|||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = 0;
|
||||
pc->clear();
|
||||
pc->error_num = ERR_IN_PROGRESS;
|
||||
while ((!iReturnValue && (ERR_IN_PROGRESS == pc->error_num)) &&
|
||||
tsExecutionTime.GetSeconds() <= 60 &&
|
||||
!CHECK_CLOSINGINPROGRESS()
|
||||
)
|
||||
{
|
||||
pc->error_num = ERR_RETRY;
|
||||
while (
|
||||
!iReturnValue &&
|
||||
((ERR_IN_PROGRESS == pc->error_num) || (ERR_RETRY == pc->error_num)) &&
|
||||
tsExecutionTime.GetSeconds() <= 60 &&
|
||||
!CHECK_CLOSINGINPROGRESS()
|
||||
) {
|
||||
if (ERR_RETRY == pc->error_num) {
|
||||
pDoc->rpc.get_project_config(
|
||||
(const char*)pWAP->m_AccountManagerInfoPage->GetProjectURL().mb_str()
|
||||
);
|
||||
}
|
||||
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = pDoc->rpc.get_project_config_poll(*pc);
|
||||
|
|
|
@ -408,20 +408,24 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
|
|||
}
|
||||
|
||||
if (pWAP->m_AccountInfoPage->m_pAccountCreateCtrl->GetValue()) {
|
||||
pDoc->rpc.create_account(*ai);
|
||||
creating_account = true;
|
||||
|
||||
// Wait until we are done processing the request.
|
||||
dtStartExecutionTime = wxDateTime::Now();
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
ao->error_num = ERR_IN_PROGRESS;
|
||||
iReturnValue = 0;
|
||||
ao->error_num = ERR_RETRY;
|
||||
while (
|
||||
ERR_IN_PROGRESS == ao->error_num && !iReturnValue &&
|
||||
!iReturnValue &&
|
||||
((ERR_IN_PROGRESS == ao->error_num) || (ERR_RETRY == ao->error_num)) &&
|
||||
tsExecutionTime.GetSeconds() <= 60 &&
|
||||
!CHECK_CLOSINGINPROGRESS()
|
||||
)
|
||||
{
|
||||
) {
|
||||
if (ERR_RETRY == reply.error_num) {
|
||||
pDoc->rpc.create_account(*ai);
|
||||
}
|
||||
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = pDoc->rpc.create_account_poll(*ao);
|
||||
|
@ -436,19 +440,24 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
|
|||
pWAP->SetAccountCreatedSuccessfully(true);
|
||||
}
|
||||
} else {
|
||||
pDoc->rpc.lookup_account(*ai);
|
||||
creating_account = false;
|
||||
|
||||
// Wait until we are done processing the request.
|
||||
dtStartExecutionTime = wxDateTime::Now();
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
ao->error_num = ERR_IN_PROGRESS;
|
||||
iReturnValue = 0;
|
||||
ao->error_num = ERR_RETRY;
|
||||
while (
|
||||
ERR_IN_PROGRESS == ao->error_num && !iReturnValue &&
|
||||
!iReturnValue &&
|
||||
((ERR_IN_PROGRESS == ao->error_num) || (ERR_RETRY == ao->error_num)) &&
|
||||
tsExecutionTime.GetSeconds() <= 60 &&
|
||||
!CHECK_CLOSINGINPROGRESS()
|
||||
)
|
||||
{
|
||||
) {
|
||||
if (ERR_RETRY == reply.error_num) {
|
||||
pDoc->rpc.lookup_account(*ai);
|
||||
}
|
||||
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = pDoc->rpc.lookup_account_poll(*ao);
|
||||
|
@ -507,27 +516,31 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
|
|||
break;
|
||||
case ATTACHPROJECT_ATTACHPROJECT_EXECUTE:
|
||||
if (GetProjectCommunitcationsSucceeded()) {
|
||||
if (pWAP->m_bCredentialsCached) {
|
||||
pDoc->rpc.project_attach_from_file();
|
||||
} else {
|
||||
pDoc->rpc.project_attach(
|
||||
ai->url.c_str(),
|
||||
ao->authenticator.c_str(),
|
||||
pWAP->project_config.name.c_str()
|
||||
);
|
||||
}
|
||||
|
||||
// Wait until we are done processing the request.
|
||||
dtStartExecutionTime = wxDateTime::Now();
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = 0;
|
||||
reply.error_num = ERR_IN_PROGRESS;
|
||||
while ((!iReturnValue && (ERR_IN_PROGRESS == reply.error_num)) &&
|
||||
reply.error_num = ERR_RETRY;
|
||||
while (
|
||||
!iReturnValue &&
|
||||
((ERR_IN_PROGRESS == reply.error_num) || (ERR_RETRY == reply.error_num)) &&
|
||||
tsExecutionTime.GetSeconds() <= 60 &&
|
||||
!CHECK_CLOSINGINPROGRESS()
|
||||
)
|
||||
{
|
||||
) {
|
||||
if (ERR_RETRY == reply.error_num) {
|
||||
if (pWAP->m_bCredentialsCached) {
|
||||
pDoc->rpc.project_attach_from_file();
|
||||
} else {
|
||||
pDoc->rpc.project_attach(
|
||||
ai->url.c_str(),
|
||||
ao->authenticator.c_str(),
|
||||
pWAP->project_config.name.c_str()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = pDoc->rpc.project_attach_poll(reply);
|
||||
|
|
|
@ -386,9 +386,6 @@ void CProjectPropertiesPage::OnStateChange( CProjectPropertiesPageEvent& WXUNUSE
|
|||
break;
|
||||
case PROJPROP_RETRPROJECTPROPERTIES_EXECUTE:
|
||||
// Attempt to retrieve the project's account creation policies
|
||||
pDoc->rpc.get_project_config(
|
||||
(const char*)pWAP->m_ProjectInfoPage->GetProjectURL().mb_str()
|
||||
);
|
||||
|
||||
// Wait until we are done processing the request.
|
||||
dtStartExecutionTime = wxDateTime::Now();
|
||||
|
@ -396,12 +393,19 @@ void CProjectPropertiesPage::OnStateChange( CProjectPropertiesPageEvent& WXUNUSE
|
|||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = 0;
|
||||
pc->clear();
|
||||
pc->error_num = ERR_IN_PROGRESS;
|
||||
while ((!iReturnValue && (ERR_IN_PROGRESS == pc->error_num)) &&
|
||||
tsExecutionTime.GetSeconds() <= 60 &&
|
||||
!CHECK_CLOSINGINPROGRESS()
|
||||
)
|
||||
{
|
||||
pc->error_num = ERR_RETRY;
|
||||
while (
|
||||
!iReturnValue &&
|
||||
((ERR_IN_PROGRESS == pc->error_num) || (ERR_RETRY == pc->error_num)) &&
|
||||
tsExecutionTime.GetSeconds() <= 60 &&
|
||||
!CHECK_CLOSINGINPROGRESS()
|
||||
) {
|
||||
if (ERR_RETRY == pc->error_num) {
|
||||
pDoc->rpc.get_project_config(
|
||||
(const char*)pWAP->m_ProjectInfoPage->GetProjectURL().mb_str()
|
||||
);
|
||||
}
|
||||
|
||||
dtCurrentExecutionTime = wxDateTime::Now();
|
||||
tsExecutionTime = dtCurrentExecutionTime - dtStartExecutionTime;
|
||||
iReturnValue = pDoc->rpc.get_project_config_poll(*pc);
|
||||
|
|
Loading…
Reference in New Issue