summaryrefslogtreecommitdiff
path: root/client/advertising.c
diff options
context:
space:
mode:
authorERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>2017-09-25 13:33:25 +0900
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2017-09-25 15:44:02 +0300
commitfb0ccc968388b8e172a7ae68336334fb20e40bac (patch)
treed5198a1858d6a6bd39e62ab1ecea157c1a70774d /client/advertising.c
parent15225b1e0be189d8ceeaecb6c8751fbabc4d8e6f (diff)
downloadbluez-fb0ccc968388b8e172a7ae68336334fb20e40bac.tar.gz
client: Prevent to pass invalid ad type to D-Bus
Diffstat (limited to 'client/advertising.c')
-rw-r--r--client/advertising.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/advertising.c b/client/advertising.c
index bfdebd5c6..76cee3da7 100644
--- a/client/advertising.c
+++ b/client/advertising.c
@@ -131,7 +131,7 @@ static gboolean get_type(const GDBusPropertyTable *property,
{
const char *type = "peripheral";
- if (!ad.type || strlen(ad.type) > 0)
+ if (ad.type && strlen(ad.type) > 0)
type = ad.type;
dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &type);