[phodav: 1/4] avahi: move mdns_unregister_service() to run_service()
- From: Victor Toso <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav: 1/4] avahi: move mdns_unregister_service() to run_service()
- Date: Tue, 3 Mar 2020 10:50:13 +0000 (UTC)
commit fd28d05b78152cc313e063a62ef7f7c84758d3cc
Author: Jakub Janků <jjanku redhat com>
Date: Thu Dec 26 11:18:40 2019 +0100
avahi: move mdns_unregister_service() to run_service()
Currently, mdns_unregister_service() is called in mux_client_read_cb(),
however the code can exit the main loop from other places,
e.g. mux_size_read_cb().
So let's unregister the service at the end of run_service()
where we also stop the socket service.
Signed-off-by: Jakub Janků <jjanku redhat com>
spice/spice-webdavd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c
index e1e0f5c..2358019 100644
--- a/spice/spice-webdavd.c
+++ b/spice/spice-webdavd.c
@@ -326,9 +326,6 @@ end:
g_clear_error (&error);
}
-#ifdef WITH_AVAHI
- mdns_unregister_service ();
-#endif
quit (-3);
}
@@ -861,6 +858,9 @@ run_service (ServiceData *service_data)
g_clear_object (&mux_queue);
g_hash_table_unref (clients);
+#ifdef WITH_AVAHI
+ mdns_unregister_service ();
+#endif
g_socket_service_stop (socket_service);
g_clear_object (&cancel);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]