[network-manager-iodine/lr/multiple-vpn: 17/17] service: drop off the bus if the peer vanishes or we're unneeded
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-iodine/lr/multiple-vpn: 17/17] service: drop off the bus if the peer vanishes or we're unneeded
- Date: Wed, 27 Jan 2016 17:41:44 +0000 (UTC)
commit 1f17e1c3fb3c33faac91817b944a05f7d604821b
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Wed Jan 27 18:36:56 2016 +0100
service: drop off the bus if the peer vanishes or we're unneeded
src/nm-iodine-service.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/nm-iodine-service.c b/src/nm-iodine-service.c
index 0589d65..5f9a16a 100644
--- a/src/nm-iodine-service.c
+++ b/src/nm-iodine-service.c
@@ -635,21 +635,23 @@ int main (int argc, char *argv[])
GMainLoop *main_loop;
gchar *bus_name = NM_DBUS_SERVICE_IODINE;
GError *error = NULL;
+ gboolean watch_peer = FALSE;
#if !GLIB_CHECK_VERSION(2,36,0)
g_type_init ();
#endif
- if (argc == 3 && !strcmp (argv[1], "--bus-name"))
+ if (argc == 3 && !strcmp (argv[1], "--bus-name")) {
bus_name = argv[2];
- else if (argc != 1) {
+ watch_peer = TRUE;
+ } else if (argc != 1) {
g_printerr ("Usage: %s [--bus-name <bus-name>]\n", argv[0]);
exit (EXIT_FAILURE);
}
plugin = (NMIodinePlugin *) g_initable_new (NM_TYPE_IODINE_PLUGIN, NULL, &error,
- NM_VPN_SERVICE_PLUGIN_DBUS_SERVICE_NAME,
- bus_name,
+ NM_VPN_SERVICE_PLUGIN_DBUS_SERVICE_NAME, bus_name,
+ NM_VPN_SERVICE_PLUGIN_DBUS_WATCH_PEER, watch_peer,
NULL);
if (!plugin) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]