From 91ba6be6e7ef385fcdf50649ab0a1d835e78bf3e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 10 Oct 2005 01:21:58 +0000 Subject: [PATCH] 2005-10-09 Dan Williams Patch from Bill Moss * src/NetworkManagerDevice.c - (nm_device_set_user_key_for_network): don't try to set auth mode on the AP from the allowed list if it's NULL git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1010 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 7 +++++++ src/NetworkManagerDevice.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 77f8c9935..7a21142e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-10-09 Dan Williams + + Patch from Bill Moss + * src/NetworkManagerDevice.c + - (nm_device_set_user_key_for_network): don't try to set auth + mode on the AP from the allowed list if it's NULL + 2005-10-09 Dan Williams * Replace the "driver support level" stuff with capabilities. The diff --git a/src/NetworkManagerDevice.c b/src/NetworkManagerDevice.c index 1a96e6db6..bb30d9f93 100644 --- a/src/NetworkManagerDevice.c +++ b/src/NetworkManagerDevice.c @@ -3431,14 +3431,15 @@ void nm_device_set_user_key_for_network (NMActRequest *req, const char *key, con } else { - NMAccessPoint * allowed_ap = nm_ap_list_get_ap_by_essid (data->allowed_ap_list, nm_ap_get_essid (ap)); + NMAccessPoint * allowed_ap; /* Start off at Open System auth mode with the new key */ nm_ap_set_auth_method (ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM); nm_ap_set_enc_key_source (ap, key, enc_type); /* Be sure to update NMI with the new auth mode */ - nm_ap_set_auth_method (allowed_ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM); + if (allowed_ap = nm_ap_list_get_ap_by_essid (data->allowed_ap_list, nm_ap_get_essid (ap))) + nm_ap_set_auth_method (allowed_ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM); nm_device_activate_schedule_stage1_device_prepare (req); }