mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
fix assertion on post. remove crufty code.
This commit is contained in:
parent
de3923f9cd
commit
0e4f0c1ce2
@ -55,7 +55,6 @@ nsNntpUrl::nsNntpUrl()
|
||||
m_messageKey = nsMsgKey_None;
|
||||
|
||||
m_port = NEWS_PORT;
|
||||
m_filePath = nsnull;
|
||||
}
|
||||
|
||||
nsNntpUrl::~nsNntpUrl()
|
||||
@ -67,8 +66,6 @@ nsNntpUrl::~nsNntpUrl()
|
||||
NS_IF_RELEASE(m_newsgroupList);
|
||||
PR_FREEIF(m_newsgroupPost);
|
||||
PR_FREEIF(m_newsgroupName);
|
||||
|
||||
delete m_filePath;
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsNntpUrl, nsMsgMailNewsUrl)
|
||||
@ -225,33 +222,21 @@ nsresult nsNntpUrl::GetNewsgroupList (nsINNTPNewsgroupList ** newsgroupList) con
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsNntpUrl::GetFilePath(const nsFileSpec ** aFilePath)
|
||||
{
|
||||
if (aFilePath)
|
||||
*aFilePath = m_filePath;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// from nsIMsgUriUrl
|
||||
NS_IMETHODIMP nsNntpUrl::GetURI(char ** aURI)
|
||||
{
|
||||
nsresult rv;
|
||||
if (aURI)
|
||||
{
|
||||
const nsFileSpec * filePath = nsnull;
|
||||
GetFilePath(&filePath);
|
||||
if (filePath)
|
||||
{
|
||||
char * uri = nsnull;
|
||||
nsFileSpec folder = *filePath;
|
||||
nsBuildNewsMessageURI(m_spec, m_messageKey, &uri);
|
||||
*aURI = uri;
|
||||
}
|
||||
else
|
||||
*aURI = nsnull;
|
||||
|
||||
char * uri = nsnull;
|
||||
rv = nsBuildNewsMessageURI(m_spec, m_messageKey, &uri);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
*aURI = uri;
|
||||
return NS_OK;
|
||||
}
|
||||
else {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -454,10 +439,6 @@ nsresult nsNntpUrl::ParseUrl(const nsString& aSpec)
|
||||
#endif
|
||||
delete [] cSpec;
|
||||
|
||||
if (m_filePath)
|
||||
delete m_filePath;
|
||||
m_filePath = new nsFileSpec(nsFilePath(m_file));
|
||||
|
||||
NS_UNLOCK_INSTANCE();
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -46,8 +46,6 @@ public:
|
||||
NS_IMETHOD SetMessageToPost(nsINNTPNewsgroupPost *post);
|
||||
NS_IMETHOD GetMessageToPost(nsINNTPNewsgroupPost **post);
|
||||
|
||||
NS_IMETHOD GetFilePath(const nsFileSpec ** aFilePath);
|
||||
|
||||
NS_IMETHOD GetMessageHeader(nsIMsgDBHdr ** aMsgHdr);
|
||||
|
||||
// this should be an IDL attribute
|
||||
|
Loading…
Reference in New Issue
Block a user