Changeset View
Changeset View
Standalone View
Standalone View
scd/app.c
Context not available. | |||||
int new_card = 0; | int new_card = 0; | ||||
/* Scan the devices to find new device(s). */ | /* Scan the devices to find new device(s). */ | ||||
npth_mutex_lock (&reader_table_lock); | |||||
err = apdu_dev_list_start (opt.reader_port, &l); | err = apdu_dev_list_start (opt.reader_port, &l); | ||||
if (err) | if (err) | ||||
{ | { | ||||
npth_mutex_unlock (&reader_table_lock); | |||||
npth_mutex_unlock (&card_list_lock); | npth_mutex_unlock (&card_list_lock); | ||||
return err; | return err; | ||||
} | } | ||||
Context not available. | |||||
if (err) | if (err) | ||||
{ | { | ||||
pincache_put (ctrl, slot, NULL, NULL, NULL, 0); | pincache_put (ctrl, slot, NULL, NULL, NULL, 0); | ||||
npth_mutex_unlock (&reader_table_lock); | |||||
apdu_close_reader (slot); | apdu_close_reader (slot); | ||||
npth_mutex_lock (&reader_table_lock); | |||||
} | } | ||||
} | } | ||||
apdu_dev_list_finish (l); | apdu_dev_list_finish (l); | ||||
npth_mutex_unlock (&reader_table_lock); | |||||
/* If new device(s), kick the scdaemon loop. */ | /* If new device(s), kick the scdaemon loop. */ | ||||
if (new_card) | if (new_card) | ||||
Context not available. |