Codebase list libnfc / 4822bb3
Fix bug introduced in some signal traps where context was not declared Philippe Teuwen 11 years ago
7 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
4848 #define MAX_FRAME_LEN 264
4949
5050 static nfc_device *pnd;
51 static nfc_context *context;
5152
5253 static void stop_dep_communication(int sig)
5354 {
7273 exit(EXIT_FAILURE);
7374 }
7475
75 nfc_context *context;
7676 nfc_init(&context);
7777 if (context == NULL) {
7878 ERR("Unable to init libnfc (malloc)");
4747 #define MAX_FRAME_LEN 264
4848
4949 static nfc_device *pnd;
50 static nfc_context *context;
5051
5152 static void stop_dep_communication(int sig)
5253 {
7172 exit(EXIT_FAILURE);
7273 }
7374
74 nfc_context *context;
7575 nfc_init(&context);
7676 if (context == NULL) {
7777 ERR("Unable to init libnfc (malloc)");
7373 #include "utils/nfc-utils.h"
7474
7575 static nfc_device *pnd;
76 static nfc_context *context;
7677
7778 static void
7879 stop_emulation(int sig)
185186
186187 signal(SIGINT, stop_emulation);
187188
188 nfc_context *context;
189189 nfc_init(&context);
190190 if (context == NULL) {
191191 ERR("Unable to init libnfc (malloc)");
5858 static uint8_t abtRecv[MAX_FRAME_LEN];
5959 static int szRecvBits;
6060 static nfc_device *pnd;
61 static nfc_context *context;
6162
6263 // ISO14443A Anti-Collision response
6364 uint8_t abtAtqa[2] = { 0x04, 0x00 };
125126 signal(SIGINT, intr_hdlr);
126127 #endif
127128
128 nfc_context *context;
129129 nfc_init(&context);
130130 if (context == NULL) {
131131 ERR("Unable to init libnfc (malloc)");
5151 #define MAX_DEVICE_COUNT 16
5252
5353 static nfc_device *pnd = NULL;
54 static nfc_context *context;
5455
5556 static void stop_polling(int sig)
5657 {
104105 nfc_target nt;
105106 int res = 0;
106107
107 nfc_context *context;
108108 nfc_init(&context);
109109 if (context == NULL) {
110110 ERR("Unable to init libnfc (malloc)");
7070 #include "nfc-utils.h"
7171
7272 static nfc_device *pnd;
73 static nfc_context *context;
7374 static bool quiet_output = false;
7475 // Version of the emulated type4 tag:
7576 static int type4v = 2;
379380 }
380381 }
381382
382 nfc_context *context;
383383 nfc_init(&context);
384384 if (context == NULL) {
385385 ERR("Unable to init libnfc (malloc)\n");
5959 #endif
6060
6161 static nfc_device *pnd;
62 static nfc_context *context;
6263
6364 static void
6465 print_usage(char *progname)
197198 }
198199 }
199200
200 nfc_context *context;
201201 nfc_init(&context);
202202 if (context == NULL) {
203203 ERR("Unable to init libnfc (malloc)\n");