From c59c0b206c25513af97b9813f42eade55ffc6ab5 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 21 Jun 2005 23:45:59 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=6395 --- checkin_notes | 7 +++++++ clientgui/MainDocument.cpp | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 3fb2f22abd..1a4888088d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8184,3 +8184,10 @@ David 21 June 2005 Makefile.am lib/ Makefile.am + +David 21 June 2005 + - Manager: don't reenter message-display code + (else can show same msg or alert twice) + + clientgui/ + MainWindow.cpp diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index e7f8511a4f..f4dd67ec28 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -817,6 +817,10 @@ int CMainDocument::WorkAbort(int iIndex) { int CMainDocument::CachedMessageUpdate() { int retval; + static bool in_this_func = false; + + if (in_this_func) return 0; + in_this_func = true; if (IsConnected()) { MESSAGES new_msgs; @@ -824,7 +828,7 @@ int CMainDocument::CachedMessageUpdate() { if (retval) { wxLogTrace(wxT("Function Status"), "CMainDocument::CachedMessageUpdate - Get Messages Failed '%d'", retval); m_pNetworkConnection->SetStateDisconnected(); - return retval; + goto done; } std::vector::iterator mi = new_msgs.messages.begin(); while (mi != new_msgs.messages.end()) { @@ -848,7 +852,8 @@ int CMainDocument::CachedMessageUpdate() { new_msgs.messages.erase(mi); } } - +done: + in_this_func = false; return 0; }