Diff

Differences From Artifact [0fee951b43]:

To Artifact [884439a73b]:


   611    611   		if (cackey_slots[idx].pcsc_card_connected) {
   612    612   			CACKEY_DEBUG_PRINTF("SCardDisconnect(%lu) called", (unsigned long) idx);
   613    613   
   614    614   			SCardDisconnect(cackey_slots[idx].pcsc_card, SCARD_LEAVE_CARD);
   615    615   		}
   616    616   
   617    617   		cackey_slots[idx].pcsc_card_connected = 0;
          618  +		cackey_slots[idx].transaction_depth = 0;
   618    619   	}
   619    620   
   620    621   	CACKEY_DEBUG_PRINTF("Returning");
   621    622   
   622    623   	return;
   623    624   }
   624    625   
................................................................................
  2284   2285   	for (idx = 0; idx < (sizeof(cackey_sessions) / sizeof(cackey_sessions[0])); idx++) {
  2285   2286   		cackey_sessions[idx].active = 0;
  2286   2287   	}
  2287   2288   
  2288   2289   	for (idx = 0; idx < (sizeof(cackey_slots) / sizeof(cackey_slots[0])); idx++) {
  2289   2290   		cackey_slots[idx].active = 0;
  2290   2291   		cackey_slots[idx].pcsc_reader = NULL;
         2292  +		cackey_slots[idx].transaction_depth = 0;
  2291   2293   	}
  2292   2294   
  2293   2295   	cackey_initialized = 1;
  2294   2296   
  2295   2297   	if (!cackey_biglock_init) {
  2296   2298   		mutex_init_ret = cackey_mutex_create(&cackey_biglock);
  2297   2299   
................................................................................
  2472   2474   					CACKEY_DEBUG_PRINTF("Found reader: %s", pcsc_readers);
  2473   2475   
  2474   2476   					/* Only update the list of slots if we are actually being supply the slot information */
  2475   2477   					if (pSlotList) {
  2476   2478   						cackey_slots[currslot].active = 1;
  2477   2479   						cackey_slots[currslot].pcsc_reader = strdup(pcsc_readers);
  2478   2480   						cackey_slots[currslot].pcsc_card_connected = 0;
         2481  +						cackey_slots[currslot].transaction_depth = 0;
  2479   2482   					}
  2480   2483   					currslot++;
  2481   2484   
  2482   2485   					pcsc_readers += curr_reader_len + 1;
  2483   2486   				}
  2484   2487   
  2485   2488   				if (currslot > 0) {