aboutsummaryrefslogtreecommitdiffstats
path: root/scd/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'scd/command.c')
-rw-r--r--scd/command.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/scd/command.c b/scd/command.c
index be0597718..5ef6540da 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -414,18 +414,19 @@ get_reader_slot (void)
int no_service_flag;
ss->slot = apdu_open_reader (opt.reader_port, &no_service_flag);
+ if (no_service_flag)
+ {
+ log_info ("no card services - disabling scdaemon\n");
+ reader_disabled = 1;
+ }
+
/* If we still don't have a slot, we have no readers.
Invalidate for now until a reader is attached. */
if(ss->slot == -1)
{
ss->valid = 0;
+ return -1;
}
-
- if (no_service_flag)
- {
- log_info ("no card services - disabling scdaemon\n");
- reader_disabled = 1;
- }
}
/* Return the slot_table index. */