summaryrefslogtreecommitdiffstats
path: root/binding/afm-nfc-binding.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-08-23 14:24:38 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-08-23 14:25:00 -0700
commit5bbcb17bb130d2ec7b32df0d56746011c230a15f (patch)
tree78ae6149814237617283ae737a8e34a65d75feeb /binding/afm-nfc-binding.c
parent6ab89f4f40b910dc35bc8142f4c542899f9d88a2 (diff)
Don't return an error code from init() even with no adapters are present to avoid service from exiting. Bug-AGL: SPEC-1683 Change-Id: I9c77950887a2d4e8163bd2fb2cce8b00af8b4574 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/afm-nfc-binding.c')
-rw-r--r--binding/afm-nfc-binding.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/binding/afm-nfc-binding.c b/binding/afm-nfc-binding.c
index b3f7fe2..70a8625 100644
--- a/binding/afm-nfc-binding.c
+++ b/binding/afm-nfc-binding.c
@@ -134,13 +134,13 @@ static nfc_binding_data *get_libnfc_instance()
dev = nfc_open(ctx, NULL);
if (dev == NULL) {
- AFB_ERROR("Cannot get context for libnfc");
+ AFB_WARNING("Cannot get context for libnfc");
nfc_exit(ctx);
return NULL;
}
if (nfc_initiator_init(dev) < 0) {
- AFB_ERROR("Cannot get initiator mode from libnfc");
+ AFB_WARNING("Cannot get initiator mode from libnfc");
nfc_close(dev);
nfc_exit(ctx);
return NULL;
@@ -247,7 +247,7 @@ static int init(afb_api_t api)
pthread_t thread_id;
nfc_binding_data *data = get_libnfc_instance();
char **adapters = NULL;
- int num_adapters, ret = -ENODEV;
+ int num_adapters, ret;
presence_event = afb_daemon_make_event("presence");
@@ -277,7 +277,7 @@ static int init(afb_api_t api)
neardal_free_array(&adapters);
- return ret;
+ return 0;
}
static void subscribe(afb_req_t request)