From aeec0b1d892fe04c8f06b2136503fdecba703e7c Mon Sep 17 00:00:00 2001 From: Robert Love Date: Wed, 22 Mar 2006 21:26:58 +0000 Subject: [PATCH] Don't hardcode the zero. The key type is NM_AUTH_TYPE_WPA_PSK_AUTO. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1631 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- gnome/applet/wireless-security-option.c | 2 +- libnm-util/dbus-helpers.c | 6 +++--- src/nm-ap-security-wpa-eap.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gnome/applet/wireless-security-option.c b/gnome/applet/wireless-security-option.c index 086ffb6ec..3383b640e 100644 --- a/gnome/applet/wireless-security-option.c +++ b/gnome/applet/wireless-security-option.c @@ -208,7 +208,7 @@ wso_wpa_create_key_type_model (int capabilities, gboolean wpa_eap, int *num_adde name = _("Automatic (Default)"); gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, WPA_KEY_TYPE_NAME_COL, name, - WPA_KEY_TYPE_CIPHER_COL, 0, -1); + WPA_KEY_TYPE_CIPHER_COL, NM_AUTH_TYPE_WPA_PSK_AUTO, -1); if (capabilities & NM_802_11_CAP_CIPHER_CCMP) { diff --git a/libnm-util/dbus-helpers.c b/libnm-util/dbus-helpers.c index 072cc1e72..0307331ac 100644 --- a/libnm-util/dbus-helpers.c +++ b/libnm-util/dbus-helpers.c @@ -268,7 +268,7 @@ nmu_security_serialize_wpa_eap (DBusMessageIter *iter, || (eap_method == NM_EAP_METHOD_PEAP) || (eap_method == NM_EAP_METHOD_TLS) || (eap_method == NM_EAP_METHOD_TTLS), FALSE); - g_return_val_if_fail ((key_type == 0) + g_return_val_if_fail ((key_type == NM_AUTH_TYPE_WPA_PSK_AUTO) || (key_type == IW_AUTH_CIPHER_CCMP) || (key_type == IW_AUTH_CIPHER_TKIP) || (key_type == IW_AUTH_CIPHER_WEP104), FALSE); @@ -331,7 +331,7 @@ nmu_security_serialize_wpa_eap_with_cipher (DBusMessageIter *iter, || (eap_method == NM_EAP_METHOD_PEAP) || (eap_method == NM_EAP_METHOD_TLS) || (eap_method == NM_EAP_METHOD_TTLS), FALSE); - g_return_val_if_fail ((key_type == 0) + g_return_val_if_fail ((key_type == NM_AUTH_TYPE_WPA_PSK_AUTO) || (key_type == IW_AUTH_CIPHER_CCMP) || (key_type == IW_AUTH_CIPHER_TKIP) || (key_type == IW_AUTH_CIPHER_WEP104), FALSE); @@ -406,7 +406,7 @@ nmu_security_deserialize_wpa_eap (DBusMessageIter *iter, g_return_val_if_fail (dbus_message_iter_next (iter), FALSE); g_return_val_if_fail (dbus_message_iter_get_arg_type (iter) == DBUS_TYPE_INT32, FALSE); dbus_message_iter_get_basic (iter, &dbus_key_type); - g_return_val_if_fail ((dbus_key_type == 0) + g_return_val_if_fail ((dbus_key_type == NM_AUTH_TYPE_WPA_PSK_AUTO) || (dbus_key_type == IW_AUTH_CIPHER_CCMP) || (dbus_key_type == IW_AUTH_CIPHER_TKIP) || (dbus_key_type == IW_AUTH_CIPHER_WEP104), FALSE); diff --git a/src/nm-ap-security-wpa-eap.c b/src/nm-ap-security-wpa-eap.c index c60623124..0d9603aec 100644 --- a/src/nm-ap-security-wpa-eap.c +++ b/src/nm-ap-security-wpa-eap.c @@ -196,7 +196,7 @@ real_write_supplicant_config (NMAPSecurity *instance, || eap_method == NM_EAP_METHOD_PEAP || eap_method == NM_EAP_METHOD_TLS || eap_method == NM_EAP_METHOD_TTLS, FALSE); - g_return_val_if_fail ((key_type == 0) + g_return_val_if_fail ((key_type == NM_AUTH_TYPE_WPA_PSK_AUTO) || (key_type == IW_AUTH_CIPHER_CCMP) || (key_type == IW_AUTH_CIPHER_TKIP) || (key_type == IW_AUTH_CIPHER_WEP104), FALSE);