diff options
author | Dan Winship <danw@gnome.org> | 2014-01-23 10:30:50 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-01-23 15:15:00 -0500 |
commit | 4e74670b472e34bfa6c40534714cd86f5dfa7b4a (patch) | |
tree | 53c723a213bc79536543f5cddc7e10c644c04c98 /src/nm-policy.c | |
parent | 828c316080ce58c43a521eca856efa95d008fd87 (diff) | |
download | NetworkManager-4e74670b472e34bfa6c40534714cd86f5dfa7b4a.tar.gz |
core: clarify clearing of autoconnect-blocked state
NMPolicy was clearing the autoconnect-blocked state on a connection
any time a device with that connection changed state. This happened to
basically do the right thing, but it would be clearer if we only reset
the state after successfully getting past the NEED_AUTH stage.
Diffstat (limited to 'src/nm-policy.c')
-rw-r--r-- | src/nm-policy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c index 55effd5c52..b47343cc20 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1364,9 +1364,6 @@ device_state_changed (NMDevice *device, NMIP6Config *ip6_config; NMSettingConnection *s_con; - if (connection) - nm_settings_connection_set_autoconnect_blocked_reason (connection, NM_DEVICE_STATE_REASON_NONE); - switch (new_state) { case NM_DEVICE_STATE_FAILED: /* Mark the connection invalid if it failed during activation so that @@ -1460,6 +1457,10 @@ device_state_changed (NMDevice *device, * activation. */ activate_slave_connections (policy, device); break; + case NM_DEVICE_STATE_IP_CONFIG: + /* We must have secrets if we got here. */ + nm_settings_connection_set_autoconnect_blocked_reason (connection, NM_DEVICE_STATE_REASON_NONE); + break; case NM_DEVICE_STATE_SECONDARIES: s_con = nm_connection_get_setting_connection (NM_CONNECTION (connection)); if (s_con && nm_setting_connection_get_num_secondaries (s_con) > 0) { |