diff options
author | SeulKi Shin <sskcorea@gmail.com> | 2017-02-14 18:27:50 +0900 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-02-14 20:17:57 +0200 |
commit | 09002b8c1e88437c01cef873736d60aa6abbbc47 (patch) | |
tree | 7eeba761690a08afd75cf6b71ca0319b43638929 /client/advertising.c | |
parent | b181536f2b494547e29754dde456c9bd1f394f68 (diff) | |
download | bluez-09002b8c1e88437c01cef873736d60aa6abbbc47.tar.gz |
client: fix calling ad_unregister
ad_register shall only be called in case the advertise command has been
called so registered flag should be checked before calling
UnregisterAdvertisement.
Diffstat (limited to 'client/advertising.c')
-rw-r--r-- | client/advertising.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/advertising.c b/client/advertising.c index 62201d54f..81fa85118 100644 --- a/client/advertising.c +++ b/client/advertising.c @@ -317,6 +317,9 @@ void ad_unregister(DBusConnection *conn, GDBusProxy *manager) if (!manager) ad_release(conn); + if (!registered) + return; + if (g_dbus_proxy_method_call(manager, "UnregisterAdvertisement", unregister_setup, unregister_reply, conn, NULL) == FALSE) { |