Bustage fix following bug 536324 landing in mozilla-central. Change content length functions to deal with 64 bit integers not 32. rs=Neil over irc. bustage fix for CLOSED TREE
authorMark Banner <bugzilla@standard8.plus.com>
Tue, 24 Aug 2010 09:06:59 +0100
changeset 6253 0525d26920e0d58989aa382778594b8c452d08b9
parent 6252 fb51b79d502c4b1d90b9afa0113762afe5534251
child 6254 b753634d4b8b5690e4b51c45accafed6e0442ccc
push idunknown
push userunknown
push dateunknown
reviewersNeil
bugs536324
Bustage fix following bug 536324 landing in mozilla-central. Change content length functions to deal with 64 bit integers not 32. rs=Neil over irc. bustage fix for CLOSED TREE
mailnews/base/util/nsMsgProtocol.cpp
mailnews/base/util/nsMsgProtocol.h
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapProtocol.h
mailnews/news/src/nsNntpMockChannel.cpp
mailnews/news/src/nsNntpMockChannel.h
--- a/mailnews/base/util/nsMsgProtocol.cpp
+++ b/mailnews/base/util/nsMsgProtocol.cpp
@@ -669,23 +669,23 @@ NS_IMETHODIMP nsMsgProtocol::GetContentC
 }
 
 NS_IMETHODIMP nsMsgProtocol::SetContentCharset(const nsACString &aContentCharset)
 {
   NS_WARNING("nsMsgProtocol::SetContentCharset() not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-NS_IMETHODIMP nsMsgProtocol::GetContentLength(PRInt32 * aContentLength)
+NS_IMETHODIMP nsMsgProtocol::GetContentLength(PRInt64 *aContentLength)
 {
   *aContentLength = mContentLength;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsMsgProtocol::SetContentLength(PRInt32 aContentLength)
+NS_IMETHODIMP nsMsgProtocol::SetContentLength(PRInt64 aContentLength)
 {
   mContentLength = aContentLength;
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMsgProtocol::GetSecurityInfo(nsISupports * *aSecurityInfo)
 {
   *aSecurityInfo = nsnull;
--- a/mailnews/base/util/nsMsgProtocol.h
+++ b/mailnews/base/util/nsMsgProtocol.h
@@ -183,17 +183,17 @@ protected:
   nsCOMPtr<nsIStreamListener> m_channelListener;
   nsCOMPtr<nsISupports>        m_channelContext;
   nsCOMPtr<nsILoadGroup>      m_loadGroup;
   nsLoadFlags                 mLoadFlags;
   nsCOMPtr<nsIProgressEventSink> mProgressEventSink;
   nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
   nsCOMPtr<nsISupports>       mOwner;
   nsCString                   m_ContentType;
-  PRInt32                     mContentLength;
+  PRInt64                     mContentLength;
 
   nsCString m_lastPasswordSent; // used to prefill the password prompt
 
   // private helper routine used by subclasses to quickly get a reference to the correct prompt dialog
   // for a mailnews url. 
   nsresult GetPromptDialogFromUrl(nsIMsgMailNewsUrl * aMsgUrl, nsIPrompt ** aPromptDialog);
 
   // if a url isn't going to result in any content then we want to suppress calls to
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -9238,24 +9238,24 @@ NS_IMETHODIMP nsImapMockChannel::GetCont
 }
 
 NS_IMETHODIMP nsImapMockChannel::SetContentCharset(const nsACString &aContentCharset)
 {
   NS_WARNING("nsImapMockChannel::SetContentCharset() not implemented");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-NS_IMETHODIMP nsImapMockChannel::GetContentLength(PRInt32 * aContentLength)
+NS_IMETHODIMP nsImapMockChannel::GetContentLength(PRInt64 * aContentLength)
 {
   *aContentLength = mContentLength;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsImapMockChannel::SetContentLength(PRInt32 aContentLength)
+nsImapMockChannel::SetContentLength(PRInt64 aContentLength)
 {
     mContentLength = aContentLength;
     return NS_OK;
 }
 
 NS_IMETHODIMP nsImapMockChannel::GetOwner(nsISupports * *aPrincipal)
 {
   *aPrincipal = mOwner;
--- a/mailnews/imap/src/nsImapProtocol.h
+++ b/mailnews/imap/src/nsImapProtocol.h
@@ -726,17 +726,17 @@ protected:
   nsCOMPtr<nsISupports> mSecurityInfo;
   nsCOMPtr<nsIRequest> mCacheRequest; // the request associated with a read from the cache
   nsCString m_ContentType;
   nsWeakPtr   m_protocol;
 
   PRBool mChannelClosed;
   PRBool mReadingFromCache;
   PRBool mTryingToReadPart;
-  PRInt32 mContentLength;
+  PRInt64 mContentLength;
 
   // cache related helper methods
   nsresult OpenCacheEntry(); // makes a request to the cache service for a cache entry for a url
   PRBool ReadFromLocalCache(); // attempts to read the url out of our local (offline) cache....
   nsresult ReadFromImapConnection(); // creates a new imap connection to read the url
   nsresult ReadFromMemCache(nsICacheEntryDescriptor *entry); // attempts to read the url out of our memory cache
   nsresult NotifyStartEndReadFromCache(PRBool start);
 
--- a/mailnews/news/src/nsNntpMockChannel.cpp
+++ b/mailnews/news/src/nsNntpMockChannel.cpp
@@ -230,25 +230,25 @@ NS_IMETHODIMP nsNntpMockChannel::GetCont
 
 NS_IMETHODIMP nsNntpMockChannel::SetContentCharset(const nsACString &aCharset)
 {
   FORWARD_CALL(SetContentCharset, aCharset)
   m_contentCharset = aCharset;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsNntpMockChannel::GetContentLength(PRInt32 *length)
+NS_IMETHODIMP nsNntpMockChannel::GetContentLength(PRInt64 *length)
 {
   FORWARD_CALL(GetContentLength, length)
   *length = m_contentLength;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsNntpMockChannel::SetContentLength(PRInt32 aLength)
+nsNntpMockChannel::SetContentLength(PRInt64 aLength)
 {
   FORWARD_CALL(SetContentLength, aLength)
   m_contentLength = aLength;
   return NS_OK;
 }
 
 ////////////////////////////////////////
 // nsIChannel and nsNNTPProtocol glue //
--- a/mailnews/news/src/nsNntpMockChannel.h
+++ b/mailnews/news/src/nsNntpMockChannel.h
@@ -86,12 +86,12 @@ protected:
   nsCOMPtr<nsILoadGroup> m_loadGroup;
   nsLoadFlags m_loadFlags;
 
   nsCOMPtr<nsIURI> m_originalUrl;
   nsCOMPtr<nsISupports> m_owner;
   nsCOMPtr<nsIInterfaceRequestor> m_notificationCallbacks;
   nsCString m_contentType;
   nsCString m_contentCharset;
-  PRInt32 m_contentLength;
+  PRInt64 m_contentLength;
 };
 
 #endif  // nsNntpMockChannel_h___