summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-api.h
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-10-08 15:39:37 +0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-11-23 08:49:14 -0800
commit581932bfa33050cc6791069c06711f4996ac1308 (patch)
treee6b4562e4b4eb8d31cf666c1e03327ad5e70be32 /binding/bluetooth-api.h
parentcfd9944c77a61215250c3b0f81978a1236d4c590 (diff)
binding: bluetooth: add check to be sure GError has been set
segfaults can happen if the dbus call reply fails but doesn't set a GError. Bug-AGL: SPEC-1630 Change-Id: I83ea2f7997a8fcef1cdd73a7df2cf9ad97e00d91 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-api.h')
-rw-r--r--binding/bluetooth-api.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/binding/bluetooth-api.h b/binding/bluetooth-api.h
index d8df0af..8ab8135 100644
--- a/binding/bluetooth-api.h
+++ b/binding/bluetooth-api.h
@@ -49,6 +49,9 @@
__tpath; \
})
+#define BLUEZ_ERRMSG(error) \
+ (error ? error->message : "unspecified")
+
#define FREEDESKTOP_INTROSPECT "org.freedesktop.DBus.Introspectable"
#define FREEDESKTOP_PROPERTIES "org.freedesktop.DBus.Properties"
#define FREEDESKTOP_OBJECTMANAGER "org.freedesktop.DBus.ObjectManager"