зеркало из https://github.com/mozilla/pjs.git
now use the identity that was passed in instead of GetHackIdentity, and remove GetHackIdentity
This commit is contained in:
Родитель
77fd7bd259
Коммит
b7951e76d3
|
@ -132,7 +132,7 @@ nsMsgSendLater::~nsMsgSendLater()
|
||||||
|
|
||||||
if (mSendListener)
|
if (mSendListener)
|
||||||
NS_RELEASE(mSendListener);
|
NS_RELEASE(mSendListener);
|
||||||
NS_RELEASE(mIdentity);
|
NS_IF_RELEASE(mIdentity);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stream is done...drive on!
|
// Stream is done...drive on!
|
||||||
|
@ -653,13 +653,10 @@ nsMsgSendLater::SendUnsentMessages(nsIMsgIdentity *identity,
|
||||||
nsIMsgSendLaterListener **listenerArray,
|
nsIMsgSendLaterListener **listenerArray,
|
||||||
void *tagData)
|
void *tagData)
|
||||||
{
|
{
|
||||||
// RICHIE - for now hack it mIdentity = identity;
|
mIdentity = identity;
|
||||||
|
|
||||||
nsIMsgIdentity *GetHackIdentity();
|
|
||||||
|
|
||||||
mIdentity = GetHackIdentity();
|
|
||||||
if (!mIdentity)
|
if (!mIdentity)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
NS_ADDREF(mIdentity);
|
||||||
|
|
||||||
// Set the listener array
|
// Set the listener array
|
||||||
if (listenerArray)
|
if (listenerArray)
|
||||||
|
@ -679,40 +676,6 @@ nsIMsgIdentity *GetHackIdentity();
|
||||||
return StartNextMailFileSend();
|
return StartNextMailFileSend();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIMsgIdentity *
|
|
||||||
GetHackIdentity()
|
|
||||||
{
|
|
||||||
nsresult rv;
|
|
||||||
|
|
||||||
NS_WITH_SERVICE(nsIMsgMailSession, mailSession, kCMsgMailSessionCID, &rv);
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
{
|
|
||||||
printf("Failure on Mail Session Init!\n");
|
|
||||||
return nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIMsgIdentity> identity = nsnull;
|
|
||||||
nsCOMPtr<nsIMsgAccountManager> accountManager;
|
|
||||||
|
|
||||||
rv = mailSession->GetAccountManager(getter_AddRefs(accountManager));
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
{
|
|
||||||
printf("Failure getting account Manager!\n");
|
|
||||||
return nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
rv = mailSession->GetCurrentIdentity(getter_AddRefs(identity));
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
{
|
|
||||||
printf("Failure getting Identity!\n");
|
|
||||||
return nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsIMsgIdentity *tPtr = identity;
|
|
||||||
NS_ADDREF(tPtr);
|
|
||||||
return tPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsMsgSendLater::DeleteCurrentMessage()
|
nsMsgSendLater::DeleteCurrentMessage()
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче