Always set number of slots

Relates to #98.
This commit is contained in:
Alessio Di Mauro
2016-10-05 16:33:24 +02:00
parent 7b7c798ef6
commit af78e18151
+5 -2
View File
@@ -198,14 +198,17 @@ CK_DEFINE_FUNCTION(CK_RV, C_GetSlotList)(
return CKR_CRYPTOKI_NOT_INITIALIZED;
}
if (pSlotList == NULL_PTR) {
// Just return the number of slots
if (pulCount) {
*pulCount = n_slots;
if (tokenPresent)
*pulCount = n_slots_with_token;
else
*pulCount = n_slots;
}
if (pSlotList == NULL_PTR) {
// Just return the number of slots
DOUT;
return CKR_OK;