• Jussi Laakkonen's avatar
    [connman] Explicitly set device managed status for notifications. JB#43928 · e9844547
    Jussi Laakkonen authored
    This commit changes the device status notify by removing the managed
    boolean from each notify call. Instead, the managed state is to be set
    explicitely for the device using connman_device_set_managed(). The
    managed state can be checked with connman_device_get_managed().
    When managed state changes a device status change notification is sent
    without any change in the device status (no transition). This is to
    indicate each registered component about the managed state change only.
    When the on/off status change is done the transition is indicated
    (connman_device_has_status_changed_to()). If the managed state changes
    when there is no status set for the device no notification will be sent.
    If status does not change connman_device_status_notify() does not
    forward notify. Identical status to previous is sent only when the
    managed status is changed.
    Developer mode plugin sets managed state to false when a appropriate
    device comes up. This state is not changed when removing the device.
    Ethernet plugin is changed to ignore status changes in managed mode.
    If the device is managed then only in case the device status is off
    it needs to be processed in order to remove the device from list. If
    there is no change and device is not managed, notify is ignored.
    Similarly to ethernet plugin the firewall reacts only to non-managed
    notifies with status change and in case the device is managed and is put
    Tests are also updated to use the new managed approach instead of
    passing it along with notifies.
firewall.c 65.4 KB