Thread (2 messages) flat view 2 messages, 2 authors, 2017-02-14

Re: [PATCH] client: fix calling ad_unregister

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2017-02-14 18:19:39

Hi,

On Tue, Feb 14, 2017 at 11:27 AM, Seulki Shin [off-list ref] wrote:
From: SeulKi Shin <redacted>

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 <redacted>
We don't use Signed-off-by line in userspace.
quoted hunk ↗ jump to hunk
---
 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
Applied, thanks.


-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help