Skip to content
  • Thomas Haller's avatar
    core: cleanup handling of AP in nm-device-wifi and fix crash · 1283816b
    Thomas Haller authored
    rh #1025371 reports a crash in handle_ip_config_timeout() because
    nm_device_wifi_get_activation_ap() did not return any access point
    (line nm-device-wifi.c:3105).
    
    In order to fix this, the whole handling of get_activation_ap vs.
    current_ap was reworked and cleaned up.
    
    This also fixes a memory leak in line nm-device-wifi.c:2111.
    
    Also rename the functions get_active_ap (to find_active_ap) and
    set_active_ap (to set_current_ap), because these two functions were not
    getter/setter for an 'active_ap' property (as would be expected from the
    previous name).
    
    Also ensure, that a fake AP is never in the list of valid APs without
    also being the current_ap. Whenever we reset a fake current_ap, the AP
    gets removed.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1025371
    
    
    
    Signed-off-by: default avatarThomas Haller <thaller@redhat.com>
    1283816b