Bug 312285: Wallet forces NSS initialization on profile-before-change, patch by Vidar Haarr <vhaarr+bmo@gmail.com>, r=dveditz.

This commit is contained in:
ajschult%verizon.net 2006-08-19 20:23:53 +00:00
parent 2389d1eac2
commit 52090324db

View File

@ -594,7 +594,7 @@ Wallet_CheckConfirmYN
/*******************************************************/ /*******************************************************/
#include "nsISecretDecoderRing.h" #include "nsISecretDecoderRing.h"
nsISecretDecoderRing* gSecretDecoderRing; nsISecretDecoderRing* gSecretDecoderRing = nsnull;
PRBool gEncryptionFailure = PR_FALSE; PRBool gEncryptionFailure = PR_FALSE;
PRInt32 gReencryptionLevel = 0; PRInt32 gReencryptionLevel = 0;
@ -707,11 +707,10 @@ static nsresult DecryptString (const char * crypt, char *& text) {
void void
WLLT_ExpirePassword(PRBool* status) { WLLT_ExpirePassword(PRBool* status) {
nsresult rv = wallet_CryptSetup(); if (gSecretDecoderRing) {
if (NS_SUCCEEDED(rv)) { gSecretDecoderRing->LogoutAndTeardown();
rv = gSecretDecoderRing->LogoutAndTeardown();
} }
*status = NS_SUCCEEDED(rv); *status = PR_TRUE;
} }
void void