Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 410557 | Differences between
and this patch

Collapse All | Expand All

(-)comm-release.orig/mailnews/base/search/src/nsMsgSearchAdapter.cpp (-1 / +1 lines)
Lines 688-694 Link Here
688
    PL_strcat(encoding, "{");
688
    PL_strcat(encoding, "{");
689
    lengthStr.AppendInt((PRInt32) strlen(value));
689
    lengthStr.AppendInt((PRInt32) strlen(value));
690
    PL_strcat(encoding, lengthStr.get());
690
    PL_strcat(encoding, lengthStr.get());
691
    PL_strcat(encoding, "}"CRLF);
691
    PL_strcat(encoding, "}" CRLF);
692
    PL_strcat(encoding, value);
692
    PL_strcat(encoding, value);
693
    return NS_OK;
693
    return NS_OK;
694
  }
694
  }
(-)comm-release.orig/mailnews/base/src/nsMsgFolderCompactor.cpp (-2 / +2 lines)
Lines 758-764 Link Here
758
          }
758
          }
759
        }
759
        }
760
      }
760
      }
761
#define EXTRA_KEYWORD_HDR "                                                                                 "MSG_LINEBREAK
761
#define EXTRA_KEYWORD_HDR "                                                                                 " MSG_LINEBREAK
762
762
763
       // if status offset isn't in the first block, this code won't work. There's no good reason
763
       // if status offset isn't in the first block, this code won't work. There's no good reason
764
      // for the status offset not to be at the beginning of the message anyway.
764
      // for the status offset not to be at the beginning of the message anyway.
Lines 1216-1222 Link Here
1216
        // check if there's an envelope header; if not, write one.
1216
        // check if there's an envelope header; if not, write one.
1217
        if (strncmp(m_dataBuffer, "From ", 5))
1217
        if (strncmp(m_dataBuffer, "From ", 5))
1218
        {
1218
        {
1219
          m_fileStream->Write("From "CRLF, 7, &bytesWritten);
1219
          m_fileStream->Write("From " CRLF, 7, &bytesWritten);
1220
          m_offlineMsgSize += bytesWritten;
1220
          m_offlineMsgSize += bytesWritten;
1221
        }
1221
        }
1222
      }
1222
      }
(-)comm-release.orig/mailnews/compose/src/nsSmtpProtocol.cpp (-2 / +2 lines)
Lines 1722-1728 Link Here
1722
{
1722
{
1723
  m_sendDone = true;
1723
  m_sendDone = true;
1724
  nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
1724
  nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
1725
  SendData(url, "QUIT"CRLF); // send a quit command to close the connection with the server.
1725
  SendData(url, "QUIT" CRLF); // send a quit command to close the connection with the server.
1726
  m_nextState = SMTP_RESPONSE;
1726
  m_nextState = SMTP_RESPONSE;
1727
  m_nextStateAfterResponse = SMTP_DONE;
1727
  m_nextStateAfterResponse = SMTP_DONE;
1728
  return(0);
1728
  return(0);
Lines 1969-1975 Link Here
1969
    {
1969
    {
1970
      nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
1970
      nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL);
1971
      // send a quit command to close the connection with the server.
1971
      // send a quit command to close the connection with the server.
1972
      if (SendData(url, "QUIT"CRLF) == NS_OK)
1972
      if (SendData(url, "QUIT" CRLF) == NS_OK)
1973
      {
1973
      {
1974
        m_nextState = SMTP_RESPONSE;
1974
        m_nextState = SMTP_RESPONSE;
1975
        m_nextStateAfterResponse = SMTP_ERROR_DONE;
1975
        m_nextStateAfterResponse = SMTP_ERROR_DONE;
(-)comm-release.orig/mailnews/imap/src/nsImapMailFolder.cpp (-1 / +1 lines)
Lines 8309-8315 Link Here
8309
          bool needMoreData = false;
8309
          bool needMoreData = false;
8310
          char * newLine = nsnull;
8310
          char * newLine = nsnull;
8311
          PRUint32 numBytesInLine = 0;
8311
          PRUint32 numBytesInLine = 0;
8312
          const char *envelope = "From "CRLF;
8312
          const char *envelope = "From " CRLF;
8313
          offlineStore->Write(envelope, strlen(envelope), &bytesWritten);
8313
          offlineStore->Write(envelope, strlen(envelope), &bytesWritten);
8314
          fileSize += bytesWritten;
8314
          fileSize += bytesWritten;
8315
          do
8315
          do
(-)comm-release.orig/mailnews/imap/src/nsImapProtocol.cpp (-14 / +14 lines)
Lines 1409-1415 Link Here
1409
{
1409
{
1410
  // PRInt32 oldRecent = GetServerStateParser().NumberOfRecentMessages();
1410
  // PRInt32 oldRecent = GetServerStateParser().NumberOfRecentMessages();
1411
  nsCAutoString commandBuffer(GetServerCommandTag());
1411
  nsCAutoString commandBuffer(GetServerCommandTag());
1412
  commandBuffer.Append(" IDLE"CRLF);
1412
  commandBuffer.Append(" IDLE" CRLF);
1413
1413
1414
  do
1414
  do
1415
  {
1415
  {
Lines 3287-3293 Link Here
3287
    commandString.Append(messageIds);
3287
    commandString.Append(messageIds);
3288
    commandString.Append(" (");
3288
    commandString.Append(" (");
3289
    commandString.Append(attribute);
3289
    commandString.Append(attribute);
3290
    commandString.Append(")"CRLF);
3290
    commandString.Append(")" CRLF);
3291
    nsresult rv = SendData(commandString.get());
3291
    nsresult rv = SendData(commandString.get());
3292
3292
3293
    if (NS_SUCCEEDED(rv))
3293
    if (NS_SUCCEEDED(rv))
Lines 5283-5289 Link Here
5283
5283
5284
  IncrementCommandTagNumber();
5284
  IncrementCommandTagNumber();
5285
  nsCAutoString command(GetServerCommandTag());
5285
  nsCAutoString command(GetServerCommandTag());
5286
  command.Append(" expunge"CRLF);
5286
  command.Append(" expunge" CRLF);
5287
5287
5288
  nsresult rv = SendData(command.get());
5288
  nsresult rv = SendData(command.get());
5289
  if (NS_SUCCEEDED(rv))
5289
  if (NS_SUCCEEDED(rv))
Lines 5359-5365 Link Here
5359
  command.Append(gAppName);
5359
  command.Append(gAppName);
5360
  command.Append("\" \"version\" \"");
5360
  command.Append("\" \"version\" \"");
5361
  command.Append(gAppVersion);
5361
  command.Append(gAppVersion);
5362
  command.Append("\")"CRLF);
5362
  command.Append("\")" CRLF);
5363
5363
5364
  nsresult rv = SendData(command.get());
5364
  nsresult rv = SendData(command.get());
5365
  if (NS_SUCCEEDED(rv))
5365
  if (NS_SUCCEEDED(rv))
Lines 5816-5822 Link Here
5816
    nsCAutoString correctedPassword;
5816
    nsCAutoString correctedPassword;
5817
    EscapeUserNamePasswordString(password.get(), &correctedPassword);
5817
    EscapeUserNamePasswordString(password.get(), &correctedPassword);
5818
    command.Append(correctedPassword);
5818
    command.Append(correctedPassword);
5819
    command.Append("\""CRLF);
5819
    command.Append("\"" CRLF);
5820
    rv = SendData(command.get(), true /* suppress logging */);
5820
    rv = SendData(command.get(), true /* suppress logging */);
5821
    NS_ENSURE_SUCCESS(rv, rv);
5821
    NS_ENSURE_SUCCESS(rv, rv);
5822
    ParseIMAPandCheckForNewMail();
5822
    ParseIMAPandCheckForNewMail();
Lines 7447-7453 Link Here
7447
  nsCString command(GetServerCommandTag());
7447
  nsCString command(GetServerCommandTag());
7448
  command += " create \"";
7448
  command += " create \"";
7449
  command += escapedName;
7449
  command += escapedName;
7450
  command += "\""CRLF;
7450
  command += "\"" CRLF;
7451
7451
7452
  nsresult rv = SendData(command.get());
7452
  nsresult rv = SendData(command.get());
7453
  if(NS_SUCCEEDED(rv))
7453
  if(NS_SUCCEEDED(rv))
Lines 7550-7556 Link Here
7550
  nsCString command (GetServerCommandTag());
7550
  nsCString command (GetServerCommandTag());
7551
  command += " lsub \"\" \"";
7551
  command += " lsub \"\" \"";
7552
  command += escapedPattern;
7552
  command += escapedPattern;
7553
  command += "\""CRLF;
7553
  command += "\"" CRLF;
7554
7554
7555
  PR_Free(boxnameWithOnlineDirectory);
7555
  PR_Free(boxnameWithOnlineDirectory);
7556
7556
Lines 7579-7585 Link Here
7579
  command += useXLIST ?
7579
  command += useXLIST ?
7580
    " xlist \"\" \"" : " list \"\" \"";
7580
    " xlist \"\" \"" : " list \"\" \"";
7581
  command += escapedPattern;
7581
  command += escapedPattern;
7582
  command += "\""CRLF;
7582
  command += "\"" CRLF;
7583
7583
7584
  PR_Free(boxnameWithOnlineDirectory);
7584
  PR_Free(boxnameWithOnlineDirectory);
7585
7585
Lines 7600-7606 Link Here
7600
  nsCString command (GetServerCommandTag());
7600
  nsCString command (GetServerCommandTag());
7601
  command += " subscribe \"";
7601
  command += " subscribe \"";
7602
  command += escapedName;
7602
  command += escapedName;
7603
  command += "\""CRLF;
7603
  command += "\"" CRLF;
7604
7604
7605
  nsresult rv = SendData(command.get());
7605
  nsresult rv = SendData(command.get());
7606
  if (NS_SUCCEEDED(rv))
7606
  if (NS_SUCCEEDED(rv))
Lines 7618-7624 Link Here
7618
  nsCString command (GetServerCommandTag());
7618
  nsCString command (GetServerCommandTag());
7619
  command += " unsubscribe \"";
7619
  command += " unsubscribe \"";
7620
  command += escapedName;
7620
  command += escapedName;
7621
  command += "\""CRLF;
7621
  command += "\"" CRLF;
7622
7622
7623
  nsresult rv = SendData(command.get());
7623
  nsresult rv = SendData(command.get());
7624
  if (NS_SUCCEEDED(rv))
7624
  if (NS_SUCCEEDED(rv))
Lines 7632-7638 Link Here
7632
  if (m_urlInProgress)
7632
  if (m_urlInProgress)
7633
    return;
7633
    return;
7634
  nsCAutoString command (GetServerCommandTag());
7634
  nsCAutoString command (GetServerCommandTag());
7635
  command += " IDLE"CRLF;
7635
  command += " IDLE" CRLF;
7636
  nsresult rv = SendData(command.get());
7636
  nsresult rv = SendData(command.get());
7637
  if (NS_SUCCEEDED(rv))
7637
  if (NS_SUCCEEDED(rv))
7638
  {
7638
  {
Lines 7659-7665 Link Here
7659
  nsCOMPtr <nsIAsyncInputStream> asyncInputStream = do_QueryInterface(m_inputStream);
7659
  nsCOMPtr <nsIAsyncInputStream> asyncInputStream = do_QueryInterface(m_inputStream);
7660
  if (asyncInputStream)
7660
  if (asyncInputStream)
7661
    asyncInputStream->AsyncWait(nsnull, 0, 0, nsnull);
7661
    asyncInputStream->AsyncWait(nsnull, 0, 0, nsnull);
7662
  nsresult rv = SendData("DONE"CRLF);
7662
  nsresult rv = SendData("DONE" CRLF);
7663
  // set a short timeout if we don't want to wait for a response
7663
  // set a short timeout if we don't want to wait for a response
7664
  if (m_transport && !waitForResponse)
7664
  if (m_transport && !waitForResponse)
7665
    m_transport->SetTimeout(nsISocketTransport::TIMEOUT_READ_WRITE, 5);
7665
    m_transport->SetTimeout(nsISocketTransport::TIMEOUT_READ_WRITE, 5);
Lines 7728-7735 Link Here
7728
  PRUint32 msgsHandled = 0;
7728
  PRUint32 msgsHandled = 0;
7729
  const char *formatString;
7729
  const char *formatString;
7730
  formatString = (idsAreUid)
7730
  formatString = (idsAreUid)
7731
      ? "%s uid store %s %s"CRLF
7731
      ? "%s uid store %s %s" CRLF
7732
      : "%s store %s %s"CRLF;
7732
      : "%s store %s %s" CRLF;
7733
7733
7734
  do
7734
  do
7735
  {
7735
  {
(-)comm-release.orig/mailnews/imap/src/nsImapServerResponseParser.cpp (-1 / +1 lines)
Lines 185-191 Link Here
185
  
185
  
186
  NS_ASSERTION(aCurrentCommand && *aCurrentCommand != '\r' && 
186
  NS_ASSERTION(aCurrentCommand && *aCurrentCommand != '\r' && 
187
    *aCurrentCommand != '\n' && *aCurrentCommand != ' ', "Invailid command string");
187
    *aCurrentCommand != '\n' && *aCurrentCommand != ' ', "Invailid command string");
188
  bool sendingIdleDone = !strcmp(aCurrentCommand, "DONE"CRLF);
188
  bool sendingIdleDone = !strcmp(aCurrentCommand, "DONE" CRLF);
189
  if (sendingIdleDone)
189
  if (sendingIdleDone)
190
    fWaitingForMoreClientInput = false;
190
    fWaitingForMoreClientInput = false;
191
191
(-)comm-release.orig/mailnews/local/src/nsPop3Protocol.cpp (-3 / +3 lines)
Lines 893-899 Link Here
893
          if (m_needToRerunUrl)
893
          if (m_needToRerunUrl)
894
            return RerunUrl();
894
            return RerunUrl();
895
895
896
          // It is a bit strange that we're going onto the next state that 
896
          // It is a bit strange that we're going onto the next state that
897
          // would essentially send the password. However in resetting the
897
          // would essentially send the password. However in resetting the
898
          // auth methods above, we're setting up SendUsername, SendPassword
898
          // auth methods above, we're setting up SendUsername, SendPassword
899
          // and friends to abort and return to the POP3_SEND_CAPA state.
899
          // and friends to abort and return to the POP3_SEND_CAPA state.
Lines 2385-2391 Link Here
2385
  /* We're just checking for new mail, and we're not playing any games that
2385
  /* We're just checking for new mail, and we're not playing any games that
2386
     involve keeping messages on the server.  Therefore, we now know enough
2386
     involve keeping messages on the server.  Therefore, we now know enough
2387
     to finish up.  If we had no messages, that would have been handled
2387
     to finish up.  If we had no messages, that would have been handled
2388
     above; therefore, we know we have some new messages. 
2388
     above; therefore, we know we have some new messages.
2389
  */
2389
  */
2390
  if (m_pop3ConData->only_check_for_new_mail && !m_pop3ConData->leave_on_server)
2390
  if (m_pop3ConData->only_check_for_new_mail && !m_pop3ConData->leave_on_server)
2391
  {
2391
  {
Lines 2483-2489 Link Here
2483
        return(MK_OUT_OF_MEMORY);
2483
        return(MK_OUT_OF_MEMORY);
2484
    m_pop3ConData->next_state_after_response = POP3_GET_LIST;
2484
    m_pop3ConData->next_state_after_response = POP3_GET_LIST;
2485
    m_listpos = 0;
2485
    m_listpos = 0;
2486
    return SendData(m_url, "LIST"CRLF);
2486
    return SendData(m_url, "LIST" CRLF);
2487
}
2487
}
2488
2488
2489
2489
(-)comm-release.orig/mailnews/mime/src/mimedrft.cpp (-1 / +1 lines)
Lines 1473-1479 Link Here
1473
                *newbody = 0;
1473
                *newbody = 0;
1474
                PL_strcatn(newbody, newbodylen, "<PRE>");
1474
                PL_strcatn(newbody, newbodylen, "<PRE>");
1475
                PL_strcatn(newbody, newbodylen, body);
1475
                PL_strcatn(newbody, newbodylen, body);
1476
                PL_strcatn(newbody, newbodylen, "</PRE>"CRLF);
1476
                PL_strcatn(newbody, newbodylen, "</PRE>" CRLF);
1477
                PR_Free(body);
1477
                PR_Free(body);
1478
                body = newbody;
1478
                body = newbody;
1479
              }
1479
              }
(-)comm-release.orig/mailnews/mime/src/mimemult.cpp (-5 / +5 lines)
Lines 280-286 Link Here
280
            MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK));
280
            MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK));
281
            MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Disposition: attachment; filename=\""));
281
            MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Disposition: attachment; filename=\""));
282
            MimeWriteAString(obj, fileName);
282
            MimeWriteAString(obj, fileName);
283
            MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK));
283
            MimeWriteAString(obj, NS_LITERAL_CSTRING("\"" MSG_LINEBREAK));
284
            MimeWriteAString(obj, NS_LITERAL_CSTRING("X-Mozilla-External-Attachment-URL: "));
284
            MimeWriteAString(obj, NS_LITERAL_CSTRING("X-Mozilla-External-Attachment-URL: "));
285
            MimeWriteAString(obj, obj->options->state->detachedFilePath);
285
            MimeWriteAString(obj, obj->options->state->detachedFilePath);
286
            MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK));
286
            MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK));
Lines 293-302 Link Here
293
            status = MimeWriteAString(obj, header);
293
            status = MimeWriteAString(obj, header);
294
            if (status < 0) 
294
            if (status < 0) 
295
              return status;
295
              return status;
296
            status = MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK"Content-Transfer-Encoding: 8bit"MSG_LINEBREAK));
296
            status = MimeWriteAString(obj, NS_LITERAL_CSTRING("\"" MSG_LINEBREAK "Content-Transfer-Encoding: 8bit" MSG_LINEBREAK));
297
            MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Disposition: inline; filename=\"Deleted: "));
297
            MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Disposition: inline; filename=\"Deleted: "));
298
            MimeWriteAString(obj, fileName);
298
            MimeWriteAString(obj, fileName);
299
            MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK"X-Mozilla-Altered: AttachmentDeleted; date=\""));
299
            MimeWriteAString(obj, NS_LITERAL_CSTRING("\"" MSG_LINEBREAK "X-Mozilla-Altered: AttachmentDeleted; date=\""));
300
          }
300
          }
301
          nsCString result;
301
          nsCString result;
302
          char timeBuffer[128];
302
          char timeBuffer[128];
Lines 306-313 Link Here
306
                                 "%a %b %d %H:%M:%S %Y",
306
                                 "%a %b %d %H:%M:%S %Y",
307
                                 &now);
307
                                 &now);
308
          MimeWriteAString(obj, nsDependentCString(timeBuffer));
308
          MimeWriteAString(obj, nsDependentCString(timeBuffer));
309
          MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK));
309
          MimeWriteAString(obj, NS_LITERAL_CSTRING("\"" MSG_LINEBREAK));
310
          MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK"You deleted an attachment from this message. The original MIME headers for the attachment were:"MSG_LINEBREAK));
310
          MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK "You deleted an attachment from this message. The original MIME headers for the attachment were:" MSG_LINEBREAK));
311
          MimeHeaders_write_raw_headers(mult->hdrs, obj->options, false);
311
          MimeHeaders_write_raw_headers(mult->hdrs, obj->options, false);
312
        }
312
        }
313
        PRInt32 old_nchildren = container->nchildren;
313
        PRInt32 old_nchildren = container->nchildren;

Return to bug 410557