main: Re-initialize the APDU split method when we enter the main_loop

Make sure we forget the current state of the APDU splitter when we
re-enter the mainloop of the application.
This commit is contained in:
Holger Hans Peter Freyther 2011-10-09 20:14:02 +02:00 committed by Harald Welte
parent 943d7d28dc
commit 54683c7b8f
1 changed files with 1 additions and 0 deletions

View File

@ -142,6 +142,7 @@ static void run_mainloop(struct libusb_device_handle *devh)
int rc;
printf("Entering main loop\n");
apdu_split_reset(as);
while (1) {
rc = libusb_bulk_transfer(devh, SIMTRACE_IN_EP, buf, sizeof(buf), &xfer_len, 100000);