fix 417285, don't display alerts for NO response from LIST command, seen with Zimbra servers, and add unrelated null transport check to prevent crash, r/sr=standard8
authorDavid Bienvenu <bienvenu@nventure.com>
Tue, 03 Feb 2009 08:51:46 -0800
changeset 1845 f53575594824040a3c4be4c1b0bb160c58a9689f
parent 1844 0665dc9c4fa709f1a43d6b5449e9e4965590b4b4
child 1846 e5addf7fe79fc03873715e21289730f37bd7528c
push id1487
push userbienvenu@nventure.com
push dateTue, 03 Feb 2009 16:51:37 +0000
treeherdercomm-central@f53575594824 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs417285
fix 417285, don't display alerts for NO response from LIST command, seen with Zimbra servers, and add unrelated null transport check to prevent crash, r/sr=standard8
mailnews/imap/src/nsImapProtocol.cpp
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -1575,17 +1575,18 @@ PRBool nsImapProtocol::ProcessCurrentURL
                 SetConnectionStatus(-1);        // stop netlib
                 m_transport->Close(rv);
               }
             }
           }
           else if (m_socketType == nsIMsgIncomingServer::alwaysUseTLS)
           {
             SetConnectionStatus(-1);        // stop netlib
-            m_transport->Close(rv);
+            if (m_transport)
+              m_transport->Close(rv);
           }
         }
         // in this case, we didn't know the server supported TLS when
         // we created the socket, so we're going to retry with
         // STARTTLS.
         else if (m_socketType == nsIMsgIncomingServer::tryTLS
             && (GetServerStateParser().GetCapabilityFlag() & kHasStartTLSCapability))
         {
@@ -7213,17 +7214,17 @@ void nsImapProtocol::List(const char *ma
   command += " list \"\" \"";
   command += escapedPattern;
   command += "\""CRLF;
 
   PR_Free(boxnameWithOnlineDirectory);
 
   nsresult rv = SendData(command.get());
   if (NS_SUCCEEDED(rv))
-    ParseIMAPandCheckForNewMail();
+    ParseIMAPandCheckForNewMail(command.get(), PR_TRUE);
 }
 
 void nsImapProtocol::Subscribe(const char *mailboxName)
 {
   ProgressEventFunctionUsingIdWithString (IMAP_STATUS_SUBSCRIBE_TO_MAILBOX, mailboxName);
 
   IncrementCommandTagNumber();