Changeset 269 for trunk/src/common/pkcs11_lib.c
- Timestamp:
- 05/15/07 07:18:24 (5 years ago)
- File:
-
- 1 edited
-
trunk/src/common/pkcs11_lib.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/pkcs11_lib.c
r255 r269 618 618 void *module_handle; 619 619 CK_FUNCTION_LIST_PTR fl; 620 int should_finalize; 620 621 slot_t *slots; 621 622 CK_ULONG slot_count; … … 715 716 if (flag) rv = h->fl->C_Initialize((CK_VOID_PTR) &initArgs); 716 717 else rv = h->fl->C_Initialize(NULL); 717 if (rv != CKR_OK) { 718 if (rv == CKR_OK) 719 h->should_finalize = 1; 720 else if (rv != CKR_CRYPTOKI_ALREADY_INITIALIZED) { 718 721 set_error("C_Initialize() failed: %x", rv); 719 722 return -1; … … 804 807 /* finalise pkcs #11 module */ 805 808 if (h->fl != NULL) 806 h->fl->C_Finalize(NULL); 809 if (h->should_finalize) 810 h->fl->C_Finalize(NULL); 807 811 /* unload the module */ 808 812 if (h->module_handle != NULL)
Note: See TracChangeset
for help on using the changeset viewer.
