Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv14214/src/mail

Modified Files:
        MailFolderCC.cpp 
Log Message:
more debugging trace messages

Index: MailFolderCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCC.cpp,v
retrieving revision 1.615
retrieving revision 1.616
diff -b -u -2 -r1.615 -r1.616
--- MailFolderCC.cpp    3 May 2002 15:00:27 -0000       1.615
+++ MailFolderCC.cpp    10 May 2002 14:10:01 -0000      1.616
@@ -87,4 +87,8 @@
 //#define USE_BLOCK_NOTIFY
 
+#ifdef USE_BLOCK_NOTIFY
+   #include <wx/datetime.h>
+#endif
+
 // ----------------------------------------------------------------------------
 // macros
@@ -499,4 +503,7 @@
    else
    {
+      wxLogTrace(TRACE_MF_CALLS, "Closing folder '%s'",
+                 folder->GetFullName().c_str());
+
       mail_close(stream);
    }
@@ -507,13 +514,17 @@
                               const MFolder *folder)
 {
+   ServerInfoEntry *server;
    if ( IsReusableFolder(folder) )
    {
       // do look for the server
-      CloseOrKeepStream(stream, folder, ServerInfoEntry::GetOrCreate(folder));
+      server = ServerInfoEntry::GetOrCreate(folder);
    }
    else // no need
    {
-      mail_close(stream);
+      // this will just call mail_close() in CloseOrKeepStream() above
+      server = NULL;
    }
+
+   CloseOrKeepStream(stream, folder, server);
 }
 
@@ -2036,7 +2047,4 @@
    String imapspec = ::GetImapSpec(folder);
 
-   wxLogTrace(TRACE_MF_CALLS, "Trying to create MailFolderCC '%s'.",
-              imapspec.c_str());
-
    String login, password;
    if ( !GetAuthInfoForFolder(folder, login, password) )
@@ -2062,4 +2070,7 @@
    // exist
    {
+      wxLogTrace(TRACE_MF_CALLS, "Trying to open MailFolderCC '%s' first.",
+                 imapspec.c_str());
+
       CCErrorDisabler noErrs;
       stream = mail_open(NULL, (char *)imapspec.c_str(),
@@ -2080,4 +2091,7 @@
    if ( !stream || stream->halfopen )
    {
+      wxLogTrace(TRACE_MF_CALLS, "Creating MailFolderCC '%s'.",
+                 imapspec.c_str());
+
       // stream may be NIL or not here
       mail_create(stream, (char *)imapspec.c_str());
@@ -2090,4 +2104,7 @@
 
       // and try to open it again now
+      wxLogTrace(TRACE_MF_CALLS, "Opening MailFolderCC '%s' after creating it.",
+                 imapspec.c_str());
+
       stream = mail_open(stream, (char *)imapspec.c_str(),
                          mm_show_debug ? OP_DEBUG : NIL);
@@ -2499,4 +2516,7 @@
          ServerInfoEntry *server = ServerInfoEntry::Get(m_mfolder);
 
+         wxLogTrace(TRACE_MF_CALLS, "Opening MailFolderCC '%s'.",
+                    m_ImapSpec.c_str());
+
          m_MailStream = mail_open(server ? server->GetStream() : NIL,
                                   (char *)m_ImapSpec.c_str(), ccOptions);
@@ -2523,4 +2543,7 @@
       }
 
+      wxLogTrace(TRACE_MF_CALLS, "Half opening MailFolderCC '%s'.",
+                 m_ImapSpec.c_str());
+
       // redirect all notifications to us again
       CCDefaultFolder def(this);
@@ -3119,7 +3142,4 @@
    }
 
-   wxLogTrace(TRACE_MF_CALLS, "MailFolderCC::Checkpoint() on %s.",
-              GetName().c_str());
-
 #ifdef USE_DIALUP
    if ( NeedsNetwork() && ! mApplication->IsOnline() )
@@ -3134,4 +3154,7 @@
    if ( lock )
    {
+      wxLogTrace(TRACE_MF_CALLS, "MailFolderCC::Checkpoint() on %s.",
+                 GetName().c_str());
+
       mail_check(m_MailStream); // update flags, etc, .newsrc
    }
@@ -3141,7 +3164,4 @@
 MailFolderCC::Ping(void)
 {
-   wxLogTrace(TRACE_MF_CALLS, "MailFolderCC::Ping() on Folder %s.",
-              GetName().c_str());
-
    // we don't want to reopen the folder from here, this leads to inifinite
    // loops if the network connection goes down because we are called from a
@@ -3286,4 +3306,7 @@
       MMStatusRedirector statusRedir(spec, &mailstatus);
 
+      wxLogTrace(TRACE_MF_CALLS, "MailFolderCC::CheckStatus() on %s.",
+                 spec.c_str());
+
       mail_status(NULL, (char *)spec.c_str(), STATUS_FLAGS);
    }
@@ -4163,4 +4186,7 @@
       CHECK( m_MailStream, 0, "DoSetSequenceFlag: folder is closed" );
 
+      wxLogTrace(TRACE_MF_CALLS, "MailFolderCC(%s)::SetFlags(%s) = %s",
+                 sequence.c_str(), flags.c_str());
+
       mail_flag(m_MailStream,
                 (char *)sequence.c_str(),
@@ -6471,6 +6497,4 @@
 
 #ifdef USE_BLOCK_NOTIFY
-
-#include <wx/datetime.h>
 
 void *mahogany_block_notify(int reason, void *data)


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to