From 578e7970d09e31a7937fea8bb112cbb3759176d1 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Thu, 6 Apr 2000 03:23:21 +0000 Subject: [PATCH] fix for #33471. fix by mscott, r=sspitzer, a=leaf. stop now works again for news, pop & smtp. git-svn-id: svn://10.0.0.236/trunk@65417 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/base/util/nsMsgProtocol.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/mailnews/base/util/nsMsgProtocol.cpp b/mozilla/mailnews/base/util/nsMsgProtocol.cpp index ba600df2c2a..6292c667641 100644 --- a/mozilla/mailnews/base/util/nsMsgProtocol.cpp +++ b/mozilla/mailnews/base/util/nsMsgProtocol.cpp @@ -48,6 +48,11 @@ nsMsgProtocol::nsMsgProtocol(nsIURI * aURL) m_tempMsgFileSpec = nsSpecialSystemDirectory(nsSpecialSystemDirectory::OS_TemporaryDirectory); m_tempMsgFileSpec += "tempMessage.eml"; m_url = aURL; + + nsCOMPtr mailUrl = do_QueryInterface(aURL); + if (mailUrl) { + mailUrl->GetLoadGroup(getter_AddRefs(m_loadGroup)); + } } nsMsgProtocol::~nsMsgProtocol() @@ -258,9 +263,9 @@ nsresult nsMsgProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer) // okay now kick us off to the next state... // our first state is a process state so drive the state machine... nsresult rv = NS_OK; - nsCOMPtr aMsgUrl = do_QueryInterface(aURL); + nsCOMPtr aMsgUrl = do_QueryInterface(aURL, &rv); - if (NS_SUCCEEDED(rv)) + if (NS_SUCCEEDED(rv) && aMsgUrl) { rv = aMsgUrl->SetUrlState(PR_TRUE, NS_OK); // set the url as a url currently being run... @@ -285,6 +290,7 @@ nsresult nsMsgProtocol::LoadUrl(nsIURI * aURL, nsISupports * aConsumer) } rv = m_channel->SetTransferCount(m_readCount); NS_ASSERTION(NS_SUCCEEDED(rv), "SetTransferCount failed"); + // put us in a state where we are always notified of incoming data rv = m_channel->AsyncRead(this /* stream observer */, urlSupports); NS_ASSERTION(NS_SUCCEEDED(rv), "AsyncRead failed");