[network-manager-openvpn] Revert "service: keep reference to plugin while main loop is running"
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] Revert "service: keep reference to plugin while main loop is running"
- Date: Mon, 15 Jan 2018 14:48:26 +0000 (UTC)
commit a270a922c2a36a8bae6278fb96642f3785184f3a
Author: Thomas Haller <thaller redhat com>
Date: Mon Jan 15 14:56:08 2018 +0100
Revert "service: keep reference to plugin while main loop is running"
After leaving the main loop on SIGTERM, we want to tear down the
NMVpnServicePlugin instance. This should also unexports the service on
D-Bus and ensure that no more requests are accepted -- as we wouldn't
handle them anyway.
Note that afterwards we still want to iterate the main loop waiting for
processes to terminate.
This reverts commit 9f45977058f7c8cf1fb0c67636cab43e2c85f228.
The crash that 9f45977058 tried to address is actually a bug
in libnm, where NMVpnServicePlugin would not unexport the D-Bus
service. This must be fixed by libnm instead [1]. Note that overall
the crash is of limited priority, because we are already in the process
of shutting down.
[1]
https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=929f36c56f3b22a917066c5cb7bfc938630f9e8c
src/nm-openvpn-service.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 94f38a9..0f4e0cf 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -2351,6 +2351,8 @@ main (int argc, char *argv[])
nm_clear_g_source (&source_id_sigint);
nm_clear_g_signal_handler (plugin, &handler_id_plugin);
+ g_clear_object (&plugin);
+
pids_pending_wait_for_processes ();
g_main_loop_unref (loop);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]