зеркало из https://github.com/mozilla/gecko-dev.git
last part of bug 121628, permanent slots should respond immediately to IsPresent() call
This commit is contained in:
Родитель
32dc696315
Коммит
7bd72fa102
|
@ -35,7 +35,7 @@
|
|||
#define DEV_H
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char DEV_CVS_ID[] = "@(#) $RCSfile: dev.h,v $ $Revision: 1.16 $ $Date: 2002/02/01 17:25:10 $ $Name: $";
|
||||
static const char DEV_CVS_ID[] = "@(#) $RCSfile: dev.h,v $ $Revision: 1.17 $ $Date: 2002/02/04 21:57:03 $ $Name: $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef DEVT_H
|
||||
|
@ -158,6 +158,12 @@ nssSlot_Destroy
|
|||
NSSSlot *slot
|
||||
);
|
||||
|
||||
NSS_EXTERN PRBool
|
||||
nssSlot_IsPermanent
|
||||
(
|
||||
NSSSlot *slot
|
||||
);
|
||||
|
||||
NSS_EXTERN PRStatus
|
||||
nssSlot_Refresh
|
||||
(
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: devtoken.c,v $ $Revision: 1.5 $ $Date: 2002/02/01 17:25:11 $ $Name: $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: devtoken.c,v $ $Revision: 1.6 $ $Date: 2002/02/04 21:57:03 $ $Name: $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef DEV_H
|
||||
|
@ -208,6 +208,10 @@ nssToken_IsPresent
|
|||
CK_SLOT_INFO slotInfo;
|
||||
NSSSlot *slot = token->slot;
|
||||
session = token->defaultSession;
|
||||
/* permanent slots are always present */
|
||||
if (nssSlot_IsPermanent(slot) && session != CK_INVALID_SESSION) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
nssSession_EnterMonitor(session);
|
||||
/* First obtain the slot info */
|
||||
ckrv = CKAPI(slot)->C_GetSlotInfo(slot->slotID, &slotInfo);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: dev3hack.c,v $ $Revision: 1.5 $ $Date: 2002/02/01 17:25:12 $ $Name: $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: dev3hack.c,v $ $Revision: 1.6 $ $Date: 2002/02/04 21:57:07 $ $Name: $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef NSS_3_4_CODE
|
||||
|
@ -154,6 +154,15 @@ nssToken_CreateFromPK11SlotInfo(NSSTrustDomain *td, PK11SlotInfo *nss3slot)
|
|||
return rvToken;
|
||||
}
|
||||
|
||||
NSS_IMPLEMENT PRBool
|
||||
nssSlot_IsPermanent
|
||||
(
|
||||
NSSSlot *slot
|
||||
)
|
||||
{
|
||||
return slot->pk11slot->isPerm;
|
||||
}
|
||||
|
||||
NSS_IMPLEMENT PRStatus
|
||||
nssSlot_Refresh
|
||||
(
|
||||
|
|
Загрузка…
Ссылка в новой задаче