Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1:/tmp/cvs-serv17012/src/gui

Modified Files:
        wxMsgCmdProc.cpp 
Log Message:
Hotfix for reentrancy while moving message

Index: wxMsgCmdProc.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMsgCmdProc.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -b -u -2 -r1.41 -r1.42
--- wxMsgCmdProc.cpp    22 Jul 2003 22:01:41 -0000      1.41
+++ wxMsgCmdProc.cpp    7 Aug 2003 11:14:06 -0000       1.42
@@ -1697,6 +1697,17 @@
                      // delete right now
 
-                     // don't copy the messages to the trash, they had been
-                     // already copied somewhere
+                     {
+                        // Reentrancy hotfix. This function can be called
+                        // recursively from idle loop. IMO, locking should
+                        // go to MEventManager::DispatchPending to prevent
+                        // nesting of any event. However there are about ten
+                        // calls to DispatchPending, that won't like it right
+                        // now. These calls can and should be replaced with
+                        // cleaner alternatives. Then we can lock
+                        // DispatchPending itself and remove this line.
+                        MEventManagerSuspender eventSuspender;
+                        
+                        // don't copy the messages to the trash, they
+                        // had been already copied somewhere
                      Ticket t = m_asmf
                                  ? m_asmf->DeleteOrTrashMessages
@@ -1716,4 +1727,5 @@
                         wxLogError(_("Failed to delete messages after "
                                      "moving them."));
+                        }
                      }
 



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to