Examples and utils are now updated to use the requiered nfc_context

This commit is contained in:
Romuald Conty 2012-12-04 19:29:57 +01:00
parent dc949c257e
commit 5b0e276572
20 changed files with 136 additions and 103 deletions

View file

@ -126,10 +126,11 @@ main(int argc, char *argv[])
signal(SIGINT, intr_hdlr);
#endif
nfc_init(NULL);
nfc_context *context;
nfc_init(&context);
// Try to open the NFC device
pnd = nfc_open(NULL, NULL);
pnd = nfc_open(context, NULL);
if (pnd == NULL) {
printf("Unable to open NFC device\n");
@ -220,11 +221,11 @@ main(int argc, char *argv[])
}
}
nfc_close(pnd);
nfc_exit(NULL);
nfc_exit(context);
exit(EXIT_SUCCESS);
error:
nfc_close(pnd);
nfc_exit(NULL);
nfc_exit(context);
exit(EXIT_FAILURE);
}