diff --git a/checkin_notes b/checkin_notes index d296aebfe4..381e4fe311 100755 --- a/checkin_notes +++ b/checkin_notes @@ -3284,3 +3284,14 @@ Rom 26 Mar 2006 ViewWork.cpp locale/client/en_US/ BOINC Manager.mo, .po + +Rom 26 Mar 2006 + - Bug Fix: Since we changed over to async connections the manager has been + shutting down which ever client is was currently connected to. So + wait until we have successfully reconnected to the local BOINC client + and verify we are connected to the local BOINC client before sending + the quit command. + + clientgui/ + BOINCGUIApp.cpp + MainDocument.cpp, .h diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index b8f90d8d60..6023aeb93b 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -700,24 +700,35 @@ void CBOINCGUIApp::StartupBOINCCore() { void CBOINCGUIApp::ShutdownBOINCCore() { wxInt32 iCount = 0; bool bClientQuit = false; + wxString strConnectedCompter = wxEmptyString; DWORD dwExitCode; - wxString strMachineName = wxT("localhost"); if (m_bBOINCStartedByManager) { // The user may have gone off to look at another machine on the network, and // we don't want to leave any dangling processes if we started them up. - m_pDocument->Connect(strMachineName); - if (GetExitCodeProcess(m_hBOINCCoreProcess, &dwExitCode)) { - if (STILL_ACTIVE == dwExitCode) { - m_pDocument->CoreClientQuit(); - for (iCount = 0; iCount <= 10; iCount++) { - if (!bClientQuit && GetExitCodeProcess(m_hBOINCCoreProcess, &dwExitCode)) { - if (STILL_ACTIVE != dwExitCode) { - bClientQuit = true; - continue; + // Wait for up to 10 seconds to finish the async reconnection + m_pDocument->Connect(wxT("localhost"), wxEmptyString, true, true); + for (iCount = 0; iCount <= 10; iCount++) { + if (m_pDocument->IsConnected()) { + continue; + } + ::Sleep(1); + } + + m_pDocument->GetConnectedComputerName(strConnectedCompter); + if (m_pDocument->IsComputerNameLocal(strConnectedCompter)) { + if (GetExitCodeProcess(m_hBOINCCoreProcess, &dwExitCode)) { + if (STILL_ACTIVE == dwExitCode) { + m_pDocument->CoreClientQuit(); + for (iCount = 0; iCount <= 10; iCount++) { + if (!bClientQuit && GetExitCodeProcess(m_hBOINCCoreProcess, &dwExitCode)) { + if (STILL_ACTIVE != dwExitCode) { + bClientQuit = true; + continue; + } } + ::Sleep(1); } - ::Sleep(1); } } } @@ -777,17 +788,26 @@ void CBOINCGUIApp::ShutdownBOINCCore() { wxString strMachineName = wxT("localhost"); if (m_bBOINCStartedByManager) { - // The user may have gone off to look at another machine on the network, and - // we don't want to leave any dangling processes if we started them up. - m_pDocument->Connect(strMachineName); - - if (ProcessExists(m_lBOINCCoreProcessId)) { - m_pDocument->CoreClientQuit(); - for (iCount = 0; iCount <= 10; iCount++) { - if (!ProcessExists(m_lBOINCCoreProcessId)) - return; + // The user may have gone off to look at another machine on the network, and + // we don't want to leave any dangling processes if we started them up. + // Wait for up to 10 seconds to finish the async reconnection + m_pDocument->Connect(wxT("localhost"), wxEmptyString, true, true); + for (iCount = 0; iCount <= 10; iCount++) { + if (m_pDocument->IsConnected()) { + continue; + } + ::Sleep(1); + } + m_pDocument->GetConnectedComputerName(strConnectedCompter); + if (m_pDocument->IsComputerNameLocal(strConnectedCompter)) { + if (ProcessExists(m_lBOINCCoreProcessId)) { + m_pDocument->CoreClientQuit(); + for (iCount = 0; iCount <= 10; iCount++) { + if (!ProcessExists(m_lBOINCCoreProcessId)) + return; - ::wxSleep(1); + ::wxSleep(1); + } } } @@ -806,15 +826,25 @@ void CBOINCGUIApp::ShutdownBOINCCore() { if (m_bBOINCStartedByManager) { // The user may have gone off to look at another machine on the network, and // we don't want to leave any dangling processes if we started them up. - m_pDocument->Connect(strMachineName); - if (wxProcess::Exists(m_lBOINCCoreProcessId)) { - m_pDocument->CoreClientQuit(); - for (iCount = 0; iCount <= 10; iCount++) { - if (!bClientQuit && !wxProcess::Exists(m_lBOINCCoreProcessId)) { - bClientQuit = true; - continue; + // Wait for up to 10 seconds to finish the async reconnection + m_pDocument->Connect(wxT("localhost"), wxEmptyString, true, true); + for (iCount = 0; iCount <= 10; iCount++) { + if (m_pDocument->IsConnected()) { + continue; + } + ::Sleep(1); + } + m_pDocument->GetConnectedComputerName(strConnectedCompter); + if (m_pDocument->IsComputerNameLocal(strConnectedCompter)) { + if (wxProcess::Exists(m_lBOINCCoreProcessId)) { + m_pDocument->CoreClientQuit(); + for (iCount = 0; iCount <= 10; iCount++) { + if (!bClientQuit && !wxProcess::Exists(m_lBOINCCoreProcessId)) { + bClientQuit = true; + continue; + } + ::wxSleep(1); } - ::wxSleep(1); } } diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 921c3abac0..815fc84f22 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -48,6 +48,7 @@ CNetworkConnection::CNetworkConnection(CMainDocument* pDocument) : CNetworkConnection::~CNetworkConnection() { } + void CNetworkConnection::GetLocalPassword(wxString& strPassword){ char buf[256]; @@ -66,9 +67,8 @@ void CNetworkConnection::GetLocalPassword(wxString& strPassword){ strPassword = wxString(buf, wxConvUTF8); } -// TODO: get rid of "reconnecting" stuff -void* CNetworkConnection::Poll() { +void CNetworkConnection::Poll() { int retval; wxString strComputer = wxEmptyString; wxString strComputerPassword = wxEmptyString; @@ -138,8 +138,6 @@ void* CNetworkConnection::Poll() { } } } - - return NULL; } diff --git a/clientgui/MainDocument.h b/clientgui/MainDocument.h index 1af2c533d1..41e864ef23 100644 --- a/clientgui/MainDocument.h +++ b/clientgui/MainDocument.h @@ -33,9 +33,9 @@ public: CNetworkConnection(CMainDocument* pDocument); ~CNetworkConnection(); - virtual void* Poll(); + void Poll(); void FireReconnectEvent() { m_bConnectEvent = true; }; - void ForceReconnect() { m_bForceReconnect = true; }; + void ForceReconnect() { m_bForceReconnect = true; m_bConnected = false; }; int FrameShutdownDetected(); int GetConnectedComputerName(wxString& strMachine); int GetConnectingComputerName(wxString& strMachine); diff --git a/locale/client/bg/BOINC Manager.mo b/locale/client/bg/BOINC Manager.mo index d281340697..44fcb1928d 100644 Binary files a/locale/client/bg/BOINC Manager.mo and b/locale/client/bg/BOINC Manager.mo differ diff --git a/locale/client/bg/BOINC Manager.po b/locale/client/bg/BOINC Manager.po index 86bc5c6680..d4df938c9e 100644 --- a/locale/client/bg/BOINC Manager.po +++ b/locale/client/bg/BOINC Manager.po @@ -2,9 +2,9 @@ msgid "" msgstr "" "Project-Id-Version: BOINC Manager 4.x\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2006-03-09 21:09+0200\n" +"PO-Revision-Date: 2006-03-27 10:28+0200\n" "Last-Translator: Son Goku 3SSJ \n" -"Language-Team: BOINC Development Team \n" +"Language-Team: AMD Powered @ Home Team \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-5\n" "Content-Transfer-Encoding: 8bit\n" @@ -211,7 +211,7 @@ msgstr "" "\n" "Моля посетете сайта на проекта и следвайте указаните инструкции. " -#: clientgui/BOINCBaseView.cpp:459 +#: clientgui/BOINCBaseView.cpp:457 msgid "Web sites" msgstr "Web сайтове" @@ -498,31 +498,31 @@ msgstr "" msgid "You are now successfully attached to this account manager." msgstr "Успешно успяхте да се прикрепите към този акаунт менажер. " -#: clientgui/DlgAbout.cpp:92 +#: clientgui/DlgAbout.cpp:93 #, c-format msgid "About %s" msgstr "Относно %s" -#: clientgui/DlgAbout.cpp:98 +#: clientgui/DlgAbout.cpp:99 #, c-format msgid "%s" msgstr "%s" -#: clientgui/DlgAbout.cpp:133 +#: clientgui/DlgAbout.cpp:138 #: clientgui/WizardAccountManager.cpp:130 #: clientgui/WizardAttachProject.cpp:141 msgid "BOINC Manager" msgstr "BOINC Manager" -#: clientgui/DlgAbout.cpp:152 +#: clientgui/DlgAbout.cpp:157 msgid "Version:" msgstr "Версия: " -#: clientgui/DlgAbout.cpp:160 +#: clientgui/DlgAbout.cpp:165 msgid "Copyright:" msgstr "Copyright:" -#: clientgui/DlgAbout.cpp:164 +#: clientgui/DlgAbout.cpp:169 msgid "" "(C) 2003-2006 University of California at Berkeley.\n" "All Rights Reserved." @@ -530,15 +530,15 @@ msgstr "" "(C) 2003-2006 Калифорнийския Университет в Бъркли.\n" "Всички права запазени." -#: clientgui/DlgAbout.cpp:168 +#: clientgui/DlgAbout.cpp:173 msgid "Berkeley Open Infrastructure for Network Computing" msgstr "Berkeley Open Infrastructure for Network Computing" -#: clientgui/DlgAbout.cpp:172 +#: clientgui/DlgAbout.cpp:177 msgid "A software platform for distributed computing using volunteered computer resources" msgstr "Софтурна платформа за разпределено изчисление, използвайки компютърните ресурси на доброволци. " -#: clientgui/DlgAbout.cpp:184 +#: clientgui/DlgAbout.cpp:189 #: clientgui/DlgDialupCredentials.cpp:136 #: clientgui/DlgGenericMessage.cpp:122 #: clientgui/DlgOptions.cpp:324 @@ -1407,7 +1407,7 @@ msgstr "'%s' msgid "'%s' does not contain a valid path." msgstr "'%s' не съдържа валиден път. " -#: clientgui/ViewMessages.cpp:74 +#: clientgui/ViewMessages.cpp:78 #: clientgui/ViewProjects.cpp:102 #: clientgui/ViewStatistics.cpp:637 #: clientgui/ViewTransfers.cpp:92 @@ -1415,23 +1415,23 @@ msgstr "'%s' msgid "Commands" msgstr "&Команди" -#: clientgui/ViewMessages.cpp:78 +#: clientgui/ViewMessages.cpp:82 msgid "Copy all messages" msgstr "Копирай всички съобщения" -#: clientgui/ViewMessages.cpp:79 +#: clientgui/ViewMessages.cpp:83 msgid "Copy all the messages to the clipboard." msgstr "Копира всички съобщения в clipboard." -#: clientgui/ViewMessages.cpp:85 +#: clientgui/ViewMessages.cpp:89 msgid "Copy selected messages" msgstr "Копирай избраните съобщения" -#: clientgui/ViewMessages.cpp:86 +#: clientgui/ViewMessages.cpp:90 msgid "Copy the selected messages to the clipboard. You can select multiple messages by holding down the shift or control key while clicking on messages." msgstr "Копира избраните съобщения в clipboard. Може да изберете някоко съобщения като задържите клавиша Shift или Ctrl, докато кликате на съобщенията." -#: clientgui/ViewMessages.cpp:98 +#: clientgui/ViewMessages.cpp:102 #: clientgui/ViewProjects.cpp:150 #: clientgui/ViewResources.cpp:76 #: clientgui/ViewStatistics.cpp:668 @@ -1440,23 +1440,23 @@ msgstr " msgid "Project" msgstr "Проект" -#: clientgui/ViewMessages.cpp:99 +#: clientgui/ViewMessages.cpp:103 msgid "Time" msgstr "Време" -#: clientgui/ViewMessages.cpp:100 +#: clientgui/ViewMessages.cpp:104 msgid "Message" msgstr "Съобщение" -#: clientgui/ViewMessages.cpp:124 +#: clientgui/ViewMessages.cpp:128 msgid "Messages" msgstr "Съобщения" -#: clientgui/ViewMessages.cpp:146 +#: clientgui/ViewMessages.cpp:150 msgid "Copying all messages to the clipboard..." msgstr "Копиране на всички съобщения в clipboard..." -#: clientgui/ViewMessages.cpp:178 +#: clientgui/ViewMessages.cpp:182 #: clientgui/ViewTransfers.cpp:185 msgid "Aborting transfer..." msgstr "Преустановяване на трансфера..." @@ -1472,7 +1472,7 @@ msgstr " #: clientgui/ViewProjects.cpp:114 #: clientgui/ViewProjects.cpp:564 #: clientgui/ViewWork.cpp:111 -#: clientgui/ViewWork.cpp:490 +#: clientgui/ViewWork.cpp:517 msgid "Suspend" msgstr "Временно прекратяване" @@ -1579,12 +1579,12 @@ msgid "Detach from Project" msgstr "Излез от проекта" #: clientgui/ViewProjects.cpp:375 -#: clientgui/ViewWork.cpp:295 +#: clientgui/ViewWork.cpp:319 msgid "Launching browser..." msgstr "Стартиране на браузъра..." #: clientgui/ViewProjects.cpp:560 -#: clientgui/ViewWork.cpp:486 +#: clientgui/ViewWork.cpp:511 msgid "Resume" msgstr "Подновяване" @@ -1605,7 +1605,7 @@ msgid "Don't fetch new tasks for this project." msgstr "Не взимай нови задачи за този проект." #: clientgui/ViewProjects.cpp:678 -#: clientgui/ViewWork.cpp:707 +#: clientgui/ViewWork.cpp:753 msgid "Suspended by user" msgstr "Преустановено от потрбителя" @@ -1768,12 +1768,12 @@ msgid "Retry in " msgstr "Нов опит след " #: clientgui/ViewTransfers.cpp:527 -#: clientgui/ViewWork.cpp:695 +#: clientgui/ViewWork.cpp:741 msgid "Download failed" msgstr "Свалянето неуспешно" #: clientgui/ViewTransfers.cpp:529 -#: clientgui/ViewWork.cpp:734 +#: clientgui/ViewWork.cpp:780 msgid "Upload failed" msgstr "Изпращането неуспешно" @@ -1783,12 +1783,12 @@ msgid "Suspended" msgstr "Временно прекратено" #: clientgui/ViewTransfers.cpp:535 -#: clientgui/ViewWork.cpp:736 +#: clientgui/ViewWork.cpp:782 msgid "Uploading" msgstr "Изпращане" #: clientgui/ViewTransfers.cpp:535 -#: clientgui/ViewWork.cpp:697 +#: clientgui/ViewWork.cpp:743 msgid "Downloading" msgstr "Сваляне" @@ -1802,10 +1802,14 @@ msgstr " #: clientgui/ViewWork.cpp:104 #: clientgui/ViewWork.cpp:213 +#: clientgui/ViewWork.cpp:532 +#: clientgui/ViewWork.cpp:540 msgid "Show graphics" msgstr "Покажи графики" #: clientgui/ViewWork.cpp:105 +#: clientgui/ViewWork.cpp:533 +#: clientgui/ViewWork.cpp:541 msgid "Show application graphics in a window." msgstr "Показва графиките в прозорец. " @@ -1843,7 +1847,7 @@ msgstr " #: clientgui/ViewWork.cpp:150 msgid "Tasks" -msgstr "Задачи" +msgstr "Опции" #: clientgui/ViewWork.cpp:175 msgid "Resuming task..." @@ -1861,75 +1865,87 @@ msgstr " msgid "Are you sure you want to display graphics on a remote machine?" msgstr "Сигурни ли сте че искате да показвате графики на отдалечена машина?" -#: clientgui/ViewWork.cpp:258 +#: clientgui/ViewWork.cpp:274 msgid "Aborting result..." msgstr "Преустановяване на резултата..." -#: clientgui/ViewWork.cpp:261 +#: clientgui/ViewWork.cpp:282 #, c-format -msgid "Are you sure you want to abort this task '%s'?" -msgstr "Сигурни ли сте, че искате да прекратите тази задача '%s'?" +msgid "" +"Are you sure you want to abort this task '%s'?\n" +"(Progress: %s, Status: %s)" +msgstr "" +"Сигурни ли сте, че искате да преустановиш тази задача '%s'?\n" +"(Прогрес: %s, Статус: %s)" -#: clientgui/ViewWork.cpp:267 +#: clientgui/ViewWork.cpp:291 msgid "Abort task" msgstr "Прекрати задачата" -#: clientgui/ViewWork.cpp:486 +#: clientgui/ViewWork.cpp:512 msgid "Resume work for this task." msgstr "Подновява работата по тази задача. " -#: clientgui/ViewWork.cpp:490 +#: clientgui/ViewWork.cpp:518 msgid "Suspend work for this task." msgstr "Временно прекратява работата по тази задача. " -#: clientgui/ViewWork.cpp:691 +#: clientgui/ViewWork.cpp:526 +msgid "Hide graphics" +msgstr "Скрий графики" + +#: clientgui/ViewWork.cpp:527 +msgid "Hide application graphics window." +msgstr "Скрива прозореца с графиките на приложението. " + +#: clientgui/ViewWork.cpp:737 msgid "New" msgstr "Ново" -#: clientgui/ViewWork.cpp:703 -#: clientgui/ViewWork.cpp:727 +#: clientgui/ViewWork.cpp:749 +#: clientgui/ViewWork.cpp:773 msgid "Aborted by user" msgstr "Преустановено от потребителя" -#: clientgui/ViewWork.cpp:705 +#: clientgui/ViewWork.cpp:751 msgid "Project suspended by user" msgstr "Проектът преустановен от потребителя" -#: clientgui/ViewWork.cpp:709 +#: clientgui/ViewWork.cpp:755 msgid "Activities suspended" msgstr "Дейностите временно прекратени" -#: clientgui/ViewWork.cpp:712 +#: clientgui/ViewWork.cpp:758 msgid "Running" msgstr "Работи" -#: clientgui/ViewWork.cpp:714 +#: clientgui/ViewWork.cpp:760 msgid "Preempted" msgstr "Изчисленията отложени" -#: clientgui/ViewWork.cpp:716 -#: clientgui/ViewWork.cpp:719 +#: clientgui/ViewWork.cpp:762 +#: clientgui/ViewWork.cpp:765 msgid "Ready to run" msgstr "Готово за работа" -#: clientgui/ViewWork.cpp:729 +#: clientgui/ViewWork.cpp:775 msgid "Computation error" msgstr "Грешка при изчисленията" -#: clientgui/ViewWork.cpp:741 +#: clientgui/ViewWork.cpp:787 msgid "Acknowledged" msgstr "Потвърдено" -#: clientgui/ViewWork.cpp:743 +#: clientgui/ViewWork.cpp:789 msgid "Ready to report" msgstr "Готово за докладване" -#: clientgui/ViewWork.cpp:745 +#: clientgui/ViewWork.cpp:791 #, c-format msgid "Error: invalid state '%d'" msgstr "Грешка: Невалидно състояние '%d'" -#: clientgui/ViewWork.cpp:753 +#: clientgui/ViewWork.cpp:799 msgid "Activities suspended by user" msgstr "Дейностите временно прекратени от потребителя"