From fd15343bda8e6dc1019d4cf4da0ee09a0d8698bf Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 18 Nov 2013 14:07:47 +0900 Subject: [PATCH] fix for regnual --- ChangeLog | 7 +++++++ src/openpgp.c | 2 +- src/usb-icc.c | 8 +++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f525fcf..74a37de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-11-18 Niibe Yutaka + + * src/openpgp.c (card_thread): Add noinline attribute. + + * src/usb-icc.c (ccid_thread): Join the OpenPGP thread. + Add noinline attribute. + 2013-11-15 Niibe Yutaka * src/configure (options): Add --enable-sys1-compat. diff --git a/src/openpgp.c b/src/openpgp.c index be3f6d6..80c4d92 100644 --- a/src/openpgp.c +++ b/src/openpgp.c @@ -1228,7 +1228,7 @@ openpgp_card_thread (void *arg) chopstx_t openpgp_card_thd; -static void * +static void * __attribute__ ((noinline)) card_thread (chopstx_t thd, struct eventflag *ccid_comm) { openpgp_card_thd = thd; diff --git a/src/usb-icc.c b/src/usb-icc.c index 3aa5aca..87c3ada 100644 --- a/src/usb-icc.c +++ b/src/usb-icc.c @@ -1307,7 +1307,7 @@ USBthread (void *arg) return ccid_thread (thd); } -static void * +static void * __attribute__ ((noinline)) ccid_thread (chopstx_t thd) { struct ep_in *epi = &endpoint_in; @@ -1386,5 +1386,11 @@ ccid_thread (chopstx_t thd) c->icc_state = icc_handle_timeout (c); } + if (c->application) + { + chopstx_join (c->application, NULL); + c->application = 0; + } + return NULL; }