mail.root.nntp wasn't getting set when I called SetDefaultLocalPath() on a nntp incoming server because QueryInterface for nsNttpService was not fixed to support nsIMsgProtocolInfo. use the cool macro and the problem goes away. woo-hoo!

This commit is contained in:
sspitzer%netscape.com 1999-09-14 09:34:23 +00:00
parent a41c2f2e9f
commit 6e6ad7cc7c

View File

@ -68,42 +68,11 @@ nsNntpService::~nsNntpService()
NS_IMPL_THREADSAFE_ADDREF(nsNntpService);
NS_IMPL_THREADSAFE_RELEASE(nsNntpService);
nsresult nsNntpService::QueryInterface(const nsIID &aIID, void** aInstancePtr)
{
if (nsnull == aInstancePtr)
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(NS_GET_IID(nsINntpService))
|| aIID.Equals(NS_GET_IID(nsISupports)) )
{
*aInstancePtr = (void*) ((nsINntpService*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(nsIMsgMessageService)))
{
*aInstancePtr = (void*) ((nsIMsgMessageService*)this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(nsIProtocolHandler)))
{
*aInstancePtr = (void *) ((nsIProtocolHandler*) this);
NS_ADDREF_THIS();
return NS_OK;
}
#if defined(NS_DEBUG)
/*
* Check for the debug-only interface indicating thread-safety
*/
static NS_DEFINE_IID(kIsThreadsafeIID, NS_ISTHREADSAFE_IID);
if (aIID.Equals(kIsThreadsafeIID))
return NS_OK;
#endif
return NS_NOINTERFACE;
}
NS_IMPL_QUERY_INTERFACE4(nsNntpService,
nsINntpService,
nsIMsgMessageService,
nsIProtocolHandler,
nsIMsgProtocolInfo)
////////////////////////////////////////////////////////////////////////////////////////
// nsIMsgMessageService support