client: fix calling ad_unregister
PATCH 1/1 client: fix calling ad_unregister
From: SeulKi Shin <[email protected]>
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 <[email protected]>
--- client/advertising.c | 3 +++ 1 file changed, 3 insertions(+)
client/advertising.c +3 -0
@@ -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) {
Signature · 1 line
2.7.4
Hi,
Quoted 7 lines · Seulki Shin
From: SeulKi Shin <[email protected]>
ad_registershall 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 <[email protected]>
We don't use Signed-off-by line in userspace.
Quoted 19 lines
--- client/advertising.c | 3 +++ 1 file changed, 3 insertions(+)client/advertising.c +3
-1@@ -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) { --
Quoted 1 line
2.7.4
Applied, thanks.
Signature · 1 line
Luiz Augusto von Dentz