[network-manager-openvpn/lr/multiple-vpn: 1/4] service
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/lr/multiple-vpn: 1/4] service
- Date: Wed, 19 Aug 2015 19:43:41 +0000 (UTC)
commit ce9d0dafeb63b25cd71fa13d649b829d5e3294e6
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Wed Aug 19 11:36:01 2015 +0200
service
src/nm-openvpn-service.c | 9 +++++----
src/nm-openvpn-service.h | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index da8a2d6..1a09b37 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -1620,14 +1620,13 @@ plugin_state_changed (NMOpenvpnPlugin *plugin,
}
NMOpenvpnPlugin *
-nm_openvpn_plugin_new (void)
+nm_openvpn_plugin_new (const char *bus_name)
{
NMOpenvpnPlugin *plugin;
GError *error = NULL;
plugin = (NMOpenvpnPlugin *) g_initable_new (NM_TYPE_OPENVPN_PLUGIN, NULL, &error,
- NM_VPN_SERVICE_PLUGIN_DBUS_SERVICE_NAME,
- NM_DBUS_SERVICE_OPENVPN,
+ NM_VPN_SERVICE_PLUGIN_DBUS_SERVICE_NAME, bus_name,
NULL);
if (plugin) {
@@ -1673,10 +1672,12 @@ main (int argc, char *argv[])
NMOpenvpnPlugin *plugin;
gboolean persist = FALSE;
GOptionContext *opt_ctx = NULL;
+ gchar *bus_name = NM_DBUS_SERVICE_OPENVPN;
GOptionEntry options[] = {
{ "persist", 0, 0, G_OPTION_ARG_NONE, &persist, N_("Don't quit when VPN connection
terminates"), NULL },
{ "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable verbose debug logging (may expose
passwords)"), NULL },
+ { "bus-name", 0, 0, G_OPTION_ARG_STRING, &bus_name, N_("DBus name to use for this instance"),
NULL },
{NULL}
};
@@ -1715,7 +1716,7 @@ main (int argc, char *argv[])
&& (system ("/sbin/modprobe tun") == -1))
exit (EXIT_FAILURE);
- plugin = nm_openvpn_plugin_new ();
+ plugin = nm_openvpn_plugin_new (bus_name);
if (!plugin)
exit (EXIT_FAILURE);
diff --git a/src/nm-openvpn-service.h b/src/nm-openvpn-service.h
index 5c3b0a4..df2ce60 100644
--- a/src/nm-openvpn-service.h
+++ b/src/nm-openvpn-service.h
@@ -46,6 +46,6 @@ typedef struct {
GType nm_openvpn_plugin_get_type (void);
-NMOpenvpnPlugin *nm_openvpn_plugin_new (void);
+NMOpenvpnPlugin *nm_openvpn_plugin_new (const char *bus_name);
#endif /* NM_OPENVPN_SERVICE_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]