summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-api.h
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-11-04 14:49:18 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-11-23 08:49:14 -0800
commita62b8f77807c73ad7ed64757f8f877d3651bb2c8 (patch)
treed9d7231f77793bbe3986bd86e1796cb48b6621b3 /binding/bluetooth-api.h
parent9161f8a0233e8e040a2dc4e89feba0897b56d8d0 (diff)
binding: bluetooth: fix interface removal event
Don't send adapter name in 'device' parameter on removal of bluetooth interface. Bug-AGL: SPEC-1630 Change-Id: I15cb4dcc791d36beb8e8b41993644cad331d3cae Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-api.h')
-rw-r--r--binding/bluetooth-api.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/binding/bluetooth-api.h b/binding/bluetooth-api.h
index 31a1d76..209f992 100644
--- a/binding/bluetooth-api.h
+++ b/binding/bluetooth-api.h
@@ -92,6 +92,11 @@ static inline gchar *bluez_return_device(const char *path)
if (!basename)
return NULL;
basename++;
+
+ /* be sure it is a bluez path with device */
+ if (strncmp(basename, "dev_", 4))
+ return NULL;
+
/* at least one character */
return *basename ? g_strdup(basename) : NULL;
}