зеркало из https://github.com/mozilla/pjs.git
fix miscellaneous bugs
This commit is contained in:
Родитель
256b38e1e0
Коммит
c899ff44b3
|
@ -610,6 +610,8 @@ PRIVATE XP_List * si_reject_list=0;
|
||||||
PRIVATE PRBool si_signon_list_changed = PR_FALSE;
|
PRIVATE PRBool si_signon_list_changed = PR_FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
char empty[] = "empty";
|
||||||
|
|
||||||
/* Remove misleading portions from URL name */
|
/* Remove misleading portions from URL name */
|
||||||
PRIVATE char*
|
PRIVATE char*
|
||||||
si_StrippedURL (char* URLName) {
|
si_StrippedURL (char* URLName) {
|
||||||
|
@ -664,8 +666,12 @@ si_StrippedURL (char* URLName) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* alll done */
|
/* all done */
|
||||||
return result;
|
if (XP_STRLEN(result)) {
|
||||||
|
return result;
|
||||||
|
} else {
|
||||||
|
return PL_strdup(empty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove terminating CRs or LFs */
|
/* remove terminating CRs or LFs */
|
||||||
|
@ -1197,11 +1203,6 @@ si_OkToSave(char *URLName, char *userName) {
|
||||||
PRBool remember_checked = PR_TRUE;
|
PRBool remember_checked = PR_TRUE;
|
||||||
char *strippedURLName = 0;
|
char *strippedURLName = 0;
|
||||||
|
|
||||||
/* do not save signons if user didn't know the key */
|
|
||||||
if (!si_KeySet()) {
|
|
||||||
return(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if url/user already exists, then it is safe to save it again */
|
/* if url/user already exists, then it is safe to save it again */
|
||||||
if (si_CheckForUser(URLName, userName)) {
|
if (si_CheckForUser(URLName, userName)) {
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
|
@ -2959,6 +2960,9 @@ SINGSIGN_GetSignonListForViewer(nsString& aSignonList)
|
||||||
si_SignonUserStruct * user;
|
si_SignonUserStruct * user;
|
||||||
si_SignonDataStruct* data;
|
si_SignonDataStruct* data;
|
||||||
|
|
||||||
|
/* force loading of the signons file */
|
||||||
|
si_RegisterSignonPrefCallbacks();
|
||||||
|
|
||||||
buffer[0] = '\0';
|
buffer[0] = '\0';
|
||||||
url_ptr = si_signon_list;
|
url_ptr = si_signon_list;
|
||||||
signonNum = 0;
|
signonNum = 0;
|
||||||
|
@ -2990,6 +2994,9 @@ SINGSIGN_GetRejectListForViewer(nsString& aRejectList)
|
||||||
XP_List *reject_ptr;
|
XP_List *reject_ptr;
|
||||||
si_Reject *reject;
|
si_Reject *reject;
|
||||||
|
|
||||||
|
/* force loading of the signons file */
|
||||||
|
si_RegisterSignonPrefCallbacks();
|
||||||
|
|
||||||
buffer[0] = '\0';
|
buffer[0] = '\0';
|
||||||
reject_ptr = si_reject_list;
|
reject_ptr = si_reject_list;
|
||||||
rejectNum = 0;
|
rejectNum = 0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче