settings: reorder checks in _delete_volatile_connection_do() to perform cheaper check first
Checking whether a settings connection is still tracked is a simple c_list_is_empty(). It's faster, so do it first.
This commit is contained in:
@@ -817,14 +817,14 @@ _delete_volatile_connection_do (NMManager *self,
|
||||
if (!NM_FLAGS_HAS (nm_settings_connection_get_flags (connection),
|
||||
NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE))
|
||||
return;
|
||||
if (!nm_settings_has_connection (priv->settings, connection))
|
||||
return;
|
||||
if (active_connection_find (self,
|
||||
connection,
|
||||
NULL,
|
||||
NM_ACTIVE_CONNECTION_STATE_DEACTIVATED,
|
||||
NULL))
|
||||
return;
|
||||
if (!nm_settings_has_connection (priv->settings, connection))
|
||||
return;
|
||||
|
||||
_LOGD (LOGD_DEVICE, "volatile connection disconnected. Deleting connection '%s' (%s)",
|
||||
nm_settings_connection_get_id (connection), nm_settings_connection_get_uuid (connection));
|
||||
|
Reference in New Issue
Block a user