Skip to content
  • Thomas Haller's avatar
    core: consolidate sorting of connections by autoconnect/timestamp · 93f7ab2c
    Thomas Haller authored
    NMPolicy's auto_activate_device() wants to sort by autoconnect-priority,
    nm_utils_cmp_connection_by_autoconnect_priority() but fallback to the default
    nm_settings_connection_cmp_default(), which includes the timestamp.
    
    Extend nm_settings_connection_cmp_default() to consider the
    autoconnect-priority as well. Thus change behavior so that
    nm_settings_connection_cmp_default() is the sort order that
    auto_activate_device() wants. That makes sense, as
    nm_settings_connection_cmp_default() already considered the
    ability to autoconnect as first. Hence, it should also honor
    the autoconnect priority.
    
    When doing that, rename nm_settings_connection_cmp_default()
    to nm_settings_connection_cmp_autoconnect_priority().
    93f7ab2c