aboutsummaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-07-19 11:05:23 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-07-19 21:23:16 +0000
commit6ab89f4f40b910dc35bc8142f4c542899f9d88a2 (patch)
treeca3eee4ac6575680f30ed334887f39d8b7ea797f /binding
parent3f91a6e6ef8243c5f37dce17284016715941f3bc (diff)
binding: nfc: remove current_uid from globals declarationsflounder_5.99.3flounder_5.99.2flounder/5.99.3flounder/5.99.25.99.35.99.2
current_uid is no longer needed now that the json_object response is cached Bug-AGL: SPEC-1554 Change-Id: If6019ff52dcb61f18616c927a489e0fb0ed90c35 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r--binding/afm-nfc-binding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/binding/afm-nfc-binding.c b/binding/afm-nfc-binding.c
index 85719b5..b3f7fe2 100644
--- a/binding/afm-nfc-binding.c
+++ b/binding/afm-nfc-binding.c
@@ -40,7 +40,6 @@
#define WAIT_FOR_REMOVE(dev) { while (0 == nfc_initiator_target_is_present(dev, NULL)) {} }
static afb_event_t presence_event;
-static char *current_uid = NULL;
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static const nfc_modulation modulations[] = {
@@ -65,7 +64,7 @@ static void send_detect_event(char *current_id, nfc_binding_data *data)
jresp = json_object_new_object();
json_object_object_add(jresp, "status", json_object_new_string("detected"));
- json_object_object_add(jresp, "uid", json_object_new_string(current_uid));
+ json_object_object_add(jresp, "uid", json_object_new_string(current_id));
if (data->jresp) {
json_object_put(data->jresp);
@@ -86,6 +85,7 @@ static void *nfc_loop_thread(void *ptr)
nfc_target nt;
json_object *jresp;
int res = nfc_initiator_poll_target(data->dev, modulations, ARRAY_SIZE(modulations), 0xff, 2, &nt);
+ char *current_uid;
if (res < 0)
break;