examples/utils: add nfc_exit() to signal traps

and one missing nfc_abort_command()
This commit is contained in:
Philippe Teuwen 2013-03-05 22:50:37 +01:00
parent 73b5c9d0af
commit e55efd6db0
7 changed files with 23 additions and 9 deletions

View file

@ -52,10 +52,12 @@ static nfc_device *pnd;
static void stop_dep_communication(int sig)
{
(void) sig;
if (pnd != NULL)
if (pnd != NULL) {
nfc_abort_command(pnd);
else
} else {
nfc_exit(context);
exit(EXIT_FAILURE);
}
}
int