From: SeulKi Shin <sskcorea@xxxxxxxxx> ad_register shall only be called in case the advertise command has been called so registered flag should be checked before calling UnregisterAdvertisement. Signed-off-by: SeulKi Shin <sskcorea@xxxxxxxxx> --- client/advertising.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/advertising.c b/client/advertising.c index 62201d5..81fa851 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) { -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html