diff options
author | Jim Rees <rees@cvs.openbsd.org> | 2001-07-17 16:57:42 +0000 |
---|---|---|
committer | Jim Rees <rees@cvs.openbsd.org> | 2001-07-17 16:57:42 +0000 |
commit | ce1bfe7f1531eba356705ed3aac4f86c54c24b6e (patch) | |
tree | 726c7e4773ff265050715240538525467722f630 /lib/libsectok | |
parent | 9d5a11e628c058b8890aab81b05d8842665daea5 (diff) |
ignore atr from card if using dummy atr
Diffstat (limited to 'lib/libsectok')
-rw-r--r-- | lib/libsectok/todos_atr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libsectok/todos_atr.c b/lib/libsectok/todos_atr.c index 850f5d091c6..b012388e7f6 100644 --- a/lib/libsectok/todos_atr.c +++ b/lib/libsectok/todos_atr.c @@ -1,4 +1,4 @@ -/* $Id: todos_atr.c,v 1.6 2001/07/02 20:07:09 rees Exp $ */ +/* $Id: todos_atr.c,v 1.7 2001/07/17 16:57:41 rees Exp $ */ /* copyright 1997, 1999, 2000 @@ -171,6 +171,9 @@ todos_get_atr(int ttyn, int flags, unsigned char *atr, struct scparam *param) int hiproto = 0; if (flags & SCRFORCE) { + /* drain and ignore any atr bytes returned by the card */ + while (scgetc(ttyn, atr, BYTETIME) == SCEOK) + ; len = sizeof dummyatr; memcpy(atr, dummyatr, len); param->t = 0; |