aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-core/recipes-connectivity/neard/files
diff options
context:
space:
mode:
authorraquel medina <raquel.medina@konsulko.com>2019-01-22 19:03:56 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-02-13 12:55:15 +0000
commita4a506023da9ebe77539af167712320a3e0cd850 (patch)
tree5a364e70ddae17eeccf22c21866e28536a56efb8 /meta-agl-profile-core/recipes-connectivity/neard/files
parent81179963052d0d2c09d8d722dfc420aee226519c (diff)
neard: cancel empty record processing on tag detection
neard service clients registered for tag interface call a series of getter methods via dbus. In the case of a tag programmed with a valid NDEF containing an empty record (D0 00 00) no valid dbus string type is associated with the record and the get_type_property call results in a dbus error and neard service exit. This commit offers a workaround to avoid this particular situation while a more comprehensive solution is found (there are other record types that would fall in this same scenario). Bug-AGL: SPEC-2123 Change-Id: I1b6d639bdc2aea0a331e8c06d6eac18da21482f5 Signed-off-by: raquel medina <raquel.medina@konsulko.com>
Diffstat (limited to 'meta-agl-profile-core/recipes-connectivity/neard/files')
-rw-r--r--meta-agl-profile-core/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-agl-profile-core/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch b/meta-agl-profile-core/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch
new file mode 100644
index 000000000..49c11a509
--- /dev/null
+++ b/meta-agl-profile-core/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch
@@ -0,0 +1,33 @@
+From d7ea2a00e00795ad24897e3481b015a27d37d60f Mon Sep 17 00:00:00 2001
+From: Raquel Medina <raquel.medina@konsulko.com>
+Date: Tue, 22 Jan 2019 09:00:05 -0500
+Subject: [PATCH] ndef: avoid dbus property_get_type method on empty record
+
+Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
+---
+ src/ndef.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/ndef.c b/src/ndef.c
+index 5656baf..883c6f4 100644
+--- a/src/ndef.c
++++ b/src/ndef.c
+@@ -2832,10 +2832,14 @@ GList *near_ndef_parse_msg(uint8_t *ndef_data, size_t ndef_length,
+ case RECORD_TYPE_WKT_ALTERNATIVE_CARRIER:
+ case RECORD_TYPE_WKT_COLLISION_RESOLUTION:
+ case RECORD_TYPE_WKT_ERROR:
+- case RECORD_TYPE_UNKNOWN:
+ case RECORD_TYPE_ERROR:
+ break;
+
++ case RECORD_TYPE_UNKNOWN:
++ if (record->header->tnf == RECORD_TNF_EMPTY)
++ goto fail;
++ break;
++
+ case RECORD_TYPE_WKT_HANDOVER_REQUEST:
+ case RECORD_TYPE_WKT_HANDOVER_SELECT:
+ /*
+--
+2.17.1
+