2008-07-31 Dan Williams <dcbw@redhat.com>

* src/nm-device-wifi.c
		- (real_act_stage2_config): fix issue where association would continue
			even though secrets were needed; 'goto out' was in wrong scope and
			result of handle_auth_or_fail() should have been dumped directly to
			'ret' to ensure that the association was postponed until secrets
			are available



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3879 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-07-31 21:31:12 +00:00
parent b2d92c4d17
commit 501c7d0947
2 changed files with 26 additions and 18 deletions

View file

@ -1,3 +1,12 @@
2008-07-31 Dan Williams <dcbw@redhat.com>
* src/nm-device-wifi.c
- (real_act_stage2_config): fix issue where association would continue
even though secrets were needed; 'goto out' was in wrong scope and
result of handle_auth_or_fail() should have been dumped directly to
'ret' to ensure that the association was postponed until secrets
are available
2008-07-31 Dan Williams <dcbw@redhat.com> 2008-07-31 Dan Williams <dcbw@redhat.com>
* system-settings/plugins/ifcfg-fedora/plugin.c * system-settings/plugins/ifcfg-fedora/plugin.c

View file

@ -2770,6 +2770,7 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason)
NMConnection * connection; NMConnection * connection;
NMSettingConnection * s_connection; NMSettingConnection * s_connection;
const char * setting_name; const char * setting_name;
NMSettingWireless * s_wireless;
g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE); g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
@ -2787,33 +2788,31 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason)
s_connection = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); s_connection = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
g_assert (s_connection); g_assert (s_connection);
s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
g_assert (s_wireless);
/* If we need secrets, get them */ /* If we need secrets, get them */
setting_name = nm_connection_need_secrets (connection, NULL); setting_name = nm_connection_need_secrets (connection, NULL);
if (setting_name) { if (setting_name) {
NMActStageReturn auth_ret;
nm_info ("Activation (%s/wireless): access point '%s' has security," nm_info ("Activation (%s/wireless): access point '%s' has security,"
" but secrets are required.", " but secrets are required.",
iface, s_connection->id); iface, s_connection->id);
auth_ret = handle_auth_or_fail (self, req, FALSE); ret = handle_auth_or_fail (self, req, FALSE);
if (auth_ret == NM_ACT_STAGE_RETURN_FAILURE) { if (ret == NM_ACT_STAGE_RETURN_FAILURE)
*reason = NM_DEVICE_STATE_REASON_NO_SECRETS; *reason = NM_DEVICE_STATE_REASON_NO_SECRETS;
goto out; goto out;
} }
} else {
NMSettingWireless *s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection,
NM_TYPE_SETTING_WIRELESS);
if (s_wireless->security) { /* have secrets, or no secrets required */
nm_info ("Activation (%s/wireless): connection '%s' has security" if (s_wireless->security) {
", and secrets exist. No new secrets needed.", nm_info ("Activation (%s/wireless): connection '%s' has security"
iface, s_connection->id); ", and secrets exist. No new secrets needed.",
} else { iface, s_connection->id);
nm_info ("Activation (%s/wireless): connection '%s' requires no " } else {
"security. No secrets needed.", nm_info ("Activation (%s/wireless): connection '%s' requires no "
iface, s_connection->id); "security. No secrets needed.",
} iface, s_connection->id);
} }
config = build_supplicant_config (self, connection, ap); config = build_supplicant_config (self, connection, ap);