[network-manager-libreswan/lr/import-export: 1/7] all: vpn service name and bus name are different things
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-libreswan/lr/import-export: 1/7] all: vpn service name and bus name are different things
- Date: Mon, 7 Dec 2015 12:58:10 +0000 (UTC)
commit 84e57d6b76937e5bd4cbe74c4f61c5ff611063fc
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Mon Dec 7 12:40:38 2015 +0100
all: vpn service name and bus name are different things
Use different macros.
auth-dialog/main.c | 4 ++--
properties/nm-libreswan.c | 4 ++--
src/nm-libreswan-service.h | 2 ++
3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 3af2912..b0ce651 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -467,8 +467,8 @@ main (int argc, char *argv[])
return 1;
}
- if (strcmp (vpn_service, NM_DBUS_SERVICE_LIBRESWAN) != 0) {
- fprintf (stderr, "This dialog only works with the '%s' service\n", NM_DBUS_SERVICE_LIBRESWAN);
+ if (strcmp (vpn_service, NM_VPN_SERVICE_TYPE_LIBRESWAN) != 0) {
+ fprintf (stderr, "This dialog only works with the '%s' service\n",
NM_VPN_SERVICE_TYPE_LIBRESWAN);
return 1;
}
diff --git a/properties/nm-libreswan.c b/properties/nm-libreswan.c
index 7e8ce48..d8eb647 100644
--- a/properties/nm-libreswan.c
+++ b/properties/nm-libreswan.c
@@ -485,7 +485,7 @@ update_connection (NMVpnEditor *iface,
return FALSE;
s_vpn = NM_SETTING_VPN (nm_setting_vpn_new ());
- g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_DBUS_SERVICE_LIBRESWAN, NULL);
+ g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, NM_VPN_SERVICE_TYPE_LIBRESWAN, NULL);
/* Gateway */
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "gateway_entry"));
@@ -672,7 +672,7 @@ get_property (GObject *object, guint prop_id,
g_value_set_string (value, LIBRESWAN_PLUGIN_DESC);
break;
case PROP_SERVICE:
- g_value_set_string (value, NM_DBUS_SERVICE_LIBRESWAN);
+ g_value_set_string (value, NM_VPN_SERVICE_TYPE_LIBRESWAN);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
diff --git a/src/nm-libreswan-service.h b/src/nm-libreswan-service.h
index 236a5de..b3fe3b9 100644
--- a/src/nm-libreswan-service.h
+++ b/src/nm-libreswan-service.h
@@ -24,6 +24,8 @@
#include <glib.h>
#include <glib-object.h>
+#define NM_VPN_SERVICE_TYPE_LIBRESWAN "org.freedesktop.NetworkManager.libreswan"
+
#define NM_DBUS_SERVICE_LIBRESWAN "org.freedesktop.NetworkManager.libreswan"
#define NM_DBUS_INTERFACE_LIBRESWAN "org.freedesktop.NetworkManager.libreswan"
#define NM_DBUS_PATH_LIBRESWAN "/org/freedesktop/NetworkManager/libreswan"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]