From 3af7068a87dbe193e0218557538ba9a25b7bf83c Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 14 May 2009 13:00:22 -0400 Subject: [PATCH] bluetooth: fix confusion about NAP and PAN NMSettingBluetooth represents the local connection, and thus should use "PANU" not NAP, because the local adapter will be in PANU mode. For now, NAP is only relevant when talking about the *remote* device in NMDeviceBt or NMBluezDevice. --- libnm-util/nm-setting-bluetooth.c | 4 ++-- libnm-util/nm-setting-bluetooth.h | 8 ++++---- src/nm-device-bt.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libnm-util/nm-setting-bluetooth.c b/libnm-util/nm-setting-bluetooth.c index 385b8ec02..6d8c76abe 100644 --- a/libnm-util/nm-setting-bluetooth.c +++ b/libnm-util/nm-setting-bluetooth.c @@ -141,7 +141,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) NM_SETTING_BLUETOOTH_TYPE); return FALSE; } else if (!g_str_equal (priv->type, NM_SETTING_BLUETOOTH_TYPE_DUN) && - !g_str_equal (priv->type, NM_SETTING_BLUETOOTH_TYPE_NAP)) { + !g_str_equal (priv->type, NM_SETTING_BLUETOOTH_TYPE_PANU)) { g_set_error (error, NM_SETTING_BLUETOOTH_ERROR, NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY, @@ -260,7 +260,7 @@ nm_setting_bluetooth_class_init (NMSettingBluetoothClass *setting_class) (object_class, PROP_TYPE, g_param_spec_string (NM_SETTING_BLUETOOTH_TYPE, "Connection type", - "Either 'dun', 'panu' or 'pan-nap'", + "Either '" NM_SETTING_BLUETOOTH_TYPE_DUN "' or '" NM_SETTING_BLUETOOTH_TYPE_PANU "'", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SERIALIZE)); } diff --git a/libnm-util/nm-setting-bluetooth.h b/libnm-util/nm-setting-bluetooth.h index 3b8f53e04..44c7dfe78 100644 --- a/libnm-util/nm-setting-bluetooth.h +++ b/libnm-util/nm-setting-bluetooth.h @@ -54,11 +54,11 @@ GType nm_setting_bluetooth_error_get_type (void); #define NM_SETTING_BLUETOOTH_ERROR nm_setting_bluetooth_error_quark () GQuark nm_setting_bluetooth_error_quark (void); -#define NM_SETTING_BLUETOOTH_BDADDR "bdaddr" -#define NM_SETTING_BLUETOOTH_TYPE "type" +#define NM_SETTING_BLUETOOTH_BDADDR "bdaddr" +#define NM_SETTING_BLUETOOTH_TYPE "type" -#define NM_SETTING_BLUETOOTH_TYPE_DUN "dun" -#define NM_SETTING_BLUETOOTH_TYPE_NAP "nap" +#define NM_SETTING_BLUETOOTH_TYPE_DUN "dun" +#define NM_SETTING_BLUETOOTH_TYPE_PANU "panu" typedef struct { NMSetting parent; diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c index 5c094aa8b..8074bd76c 100644 --- a/src/nm-device-bt.c +++ b/src/nm-device-bt.c @@ -110,7 +110,7 @@ get_connection_bt_type (NMConnection *connection) if (!strcmp (bt_type, NM_SETTING_BLUETOOTH_TYPE_DUN)) return NM_BT_CAPABILITY_DUN; - else if (!strcmp (bt_type, NM_SETTING_BLUETOOTH_TYPE_NAP)) + else if (!strcmp (bt_type, NM_SETTING_BLUETOOTH_TYPE_PANU)) return NM_BT_CAPABILITY_NAP; return NM_BT_CAPABILITY_NONE;