Bug 589759 - Wait 5 minutes without entering password, Thunderbird stops responding/hangs if pop connection was closed while the password prompt was up. r=dbienvenu
authoraceman <acelists@atlas.sk>
Fri, 09 Mar 2012 17:45:43 -0500
changeset 11046 9ebce24271f89703f2a22906719f3c0a001b129e
parent 11045 3eaa70af5151575584e8453298b7eba25a40b88a
child 11047 11c1e0e006b2b0dfcf929d33e3d827b6f8355d76
push id463
push userbugzilla@standard8.plus.com
push dateTue, 24 Apr 2012 17:34:51 +0000
treeherdercomm-beta@e53588e8f7b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbienvenu
bugs589759
Bug 589759 - Wait 5 minutes without entering password, Thunderbird stops responding/hangs if pop connection was closed while the password prompt was up. r=dbienvenu
mailnews/local/src/nsPop3Protocol.cpp
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -3929,16 +3929,20 @@ nsresult nsPop3Protocol::ProcessProtocol
       status = AuthGSSAPIResponse(false);
       break;
 
     case POP3_SEND_USERNAME:
       if (NS_FAILED(StartGetAsyncPassword(POP3_OBTAIN_PASSWORD_BEFORE_USERNAME)))
         status = -1;
       break;
 
+    case POP3_OBTAIN_PASSWORD_BEFORE_USERNAME:
+      status = -1;
+      break;
+
     case POP3_FINISH_OBTAIN_PASSWORD_BEFORE_USERNAME:
       UpdateStatus(NS_LITERAL_STRING("hostContacted"));
       status = SendUsername();
       break;
 
     case POP3_SEND_PASSWORD:
       if (NS_FAILED(StartGetAsyncPassword(POP3_OBTAIN_PASSWORD_BEFORE_PASSWORD)))
         status = -1;
@@ -4163,17 +4167,17 @@ nsresult nsPop3Protocol::ProcessProtocol
           mailnewsurl->SetUrlState(false, m_pop3ConData->urlStatus);
 
         CloseSocket();
         m_url = nsnull;
         return NS_OK;
       }
     default:
       NS_ERROR("Got to unexpected state in nsPop3Protocol::ProcessProtocolState");
-
+      status = -1;
     }  /* end switch */
 
     if((status < 0) && m_pop3ConData->next_state != POP3_FREE)
     {
       m_pop3ConData->pause_for_read = false;
       m_pop3ConData->next_state = POP3_ERROR_DONE;
     }