From 3b2fc8c4e063e0cd762e463ea4fa59bc81d65c53 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 git-svn-id: svn://10.0.0.236/trunk@28141 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/extensions/wallet/src/singsign.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mozilla/extensions/wallet/src/singsign.cpp b/mozilla/extensions/wallet/src/singsign.cpp index e719e02d287..812dd2d811f 100644 --- a/mozilla/extensions/wallet/src/singsign.cpp +++ b/mozilla/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; }