Fix bug introduced in some signal traps where context was not declared
Philippe Teuwen
11 years ago
48 | 48 |
#define MAX_FRAME_LEN 264
|
49 | 49 |
|
50 | 50 |
static nfc_device *pnd;
|
|
51 |
static nfc_context *context;
|
51 | 52 |
|
52 | 53 |
static void stop_dep_communication(int sig)
|
53 | 54 |
{
|
|
72 | 73 |
exit(EXIT_FAILURE);
|
73 | 74 |
}
|
74 | 75 |
|
75 | |
nfc_context *context;
|
76 | 76 |
nfc_init(&context);
|
77 | 77 |
if (context == NULL) {
|
78 | 78 |
ERR("Unable to init libnfc (malloc)");
|
47 | 47 |
#define MAX_FRAME_LEN 264
|
48 | 48 |
|
49 | 49 |
static nfc_device *pnd;
|
|
50 |
static nfc_context *context;
|
50 | 51 |
|
51 | 52 |
static void stop_dep_communication(int sig)
|
52 | 53 |
{
|
|
71 | 72 |
exit(EXIT_FAILURE);
|
72 | 73 |
}
|
73 | 74 |
|
74 | |
nfc_context *context;
|
75 | 75 |
nfc_init(&context);
|
76 | 76 |
if (context == NULL) {
|
77 | 77 |
ERR("Unable to init libnfc (malloc)");
|
73 | 73 |
#include "utils/nfc-utils.h"
|
74 | 74 |
|
75 | 75 |
static nfc_device *pnd;
|
|
76 |
static nfc_context *context;
|
76 | 77 |
|
77 | 78 |
static void
|
78 | 79 |
stop_emulation(int sig)
|
|
185 | 186 |
|
186 | 187 |
signal(SIGINT, stop_emulation);
|
187 | 188 |
|
188 | |
nfc_context *context;
|
189 | 189 |
nfc_init(&context);
|
190 | 190 |
if (context == NULL) {
|
191 | 191 |
ERR("Unable to init libnfc (malloc)");
|
58 | 58 |
static uint8_t abtRecv[MAX_FRAME_LEN];
|
59 | 59 |
static int szRecvBits;
|
60 | 60 |
static nfc_device *pnd;
|
|
61 |
static nfc_context *context;
|
61 | 62 |
|
62 | 63 |
// ISO14443A Anti-Collision response
|
63 | 64 |
uint8_t abtAtqa[2] = { 0x04, 0x00 };
|
|
125 | 126 |
signal(SIGINT, intr_hdlr);
|
126 | 127 |
#endif
|
127 | 128 |
|
128 | |
nfc_context *context;
|
129 | 129 |
nfc_init(&context);
|
130 | 130 |
if (context == NULL) {
|
131 | 131 |
ERR("Unable to init libnfc (malloc)");
|
51 | 51 |
#define MAX_DEVICE_COUNT 16
|
52 | 52 |
|
53 | 53 |
static nfc_device *pnd = NULL;
|
|
54 |
static nfc_context *context;
|
54 | 55 |
|
55 | 56 |
static void stop_polling(int sig)
|
56 | 57 |
{
|
|
104 | 105 |
nfc_target nt;
|
105 | 106 |
int res = 0;
|
106 | 107 |
|
107 | |
nfc_context *context;
|
108 | 108 |
nfc_init(&context);
|
109 | 109 |
if (context == NULL) {
|
110 | 110 |
ERR("Unable to init libnfc (malloc)");
|
70 | 70 |
#include "nfc-utils.h"
|
71 | 71 |
|
72 | 72 |
static nfc_device *pnd;
|
|
73 |
static nfc_context *context;
|
73 | 74 |
static bool quiet_output = false;
|
74 | 75 |
// Version of the emulated type4 tag:
|
75 | 76 |
static int type4v = 2;
|
|
379 | 380 |
}
|
380 | 381 |
}
|
381 | 382 |
|
382 | |
nfc_context *context;
|
383 | 383 |
nfc_init(&context);
|
384 | 384 |
if (context == NULL) {
|
385 | 385 |
ERR("Unable to init libnfc (malloc)\n");
|