Improve logging of exit codes
This commit is contained in:
parent
3c87ffaa02
commit
0ea11523a3
|
@ -591,7 +591,7 @@ CK_RV C_GetTokenInfo(CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo)
|
|||
memcpy(pInfo, &slot->token_info, sizeof(CK_TOKEN_INFO));
|
||||
out:
|
||||
sc_pkcs11_unlock();
|
||||
sc_log(context, "C_GetTokenInfo(%lx) returns 0x%lX", slotID, rv);
|
||||
sc_log(context, "C_GetTokenInfo(%lx) returns %s", slotID, lookup_enum(RV_T, rv));
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -584,12 +584,11 @@ CK_RV C_GetSlotInfo(CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo)
|
|||
}
|
||||
|
||||
rv = slot_get_slot(slotID, &slot);
|
||||
sc_log(context, "C_GetSlotInfo() get slot rv %lu", rv);
|
||||
sc_log(context, "C_GetSlotInfo() get slot rv %s", lookup_enum( RV_T, rv));
|
||||
if (rv == CKR_OK) {
|
||||
if (slot->reader == NULL) {
|
||||
rv = CKR_TOKEN_NOT_PRESENT;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
now = get_current_time();
|
||||
if (now >= slot->slot_state_expires || now == 0) {
|
||||
/* Update slot status */
|
||||
|
|
Loading…
Reference in New Issue