From 2edd9f63e80c66edc4912295a55e936874bebc3b Mon Sep 17 00:00:00 2001 From: "morse%netscape.com" Date: Mon, 19 Apr 1999 22:36:49 +0000 Subject: [PATCH] fixed problems with PromptUsernameAndPassword when dialogs are turned off --- extensions/wallet/src/singsign.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/wallet/src/singsign.cpp b/extensions/wallet/src/singsign.cpp index e719e02d287..812dd2d811f 100644 --- a/extensions/wallet/src/singsign.cpp +++ b/extensions/wallet/src/singsign.cpp @@ -164,8 +164,8 @@ MyFE_PromptUsernameAndPassword (char *msg, char **username, char **password) { if (!si_GetUsingDialogsPref()) { - *username = "your name"; - *password = "your password"; + *username = PL_strdup("your name"); + *password = PL_strdup("your password"); return PR_TRUE; } @@ -1751,7 +1751,9 @@ si_LoadSignonData(PRBool fullLoad) { if (fullLoad) { si_RestartKey(); while (!si_SetKey()) { - if (!MyFE_Confirm("incorrect key -- do you want to try again?")) { + if (!si_GetUsingDialogsPref()) { + return 1; + } else if (!MyFE_Confirm("incorrect key -- do you want to try again?")) { MyFE_Confirm("Key failure -- password file will not be opened"); return 1; }