Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
network: Fix noisy warning on every connect
On every connect I get 'Skipping disconnect of ..., network is connecting'.
This is happening because __connman_network_connect sets connecting
flag before __connman_device_disconnect. The last function then prints
warning due to this connecting flag.

Changed order of assigning connecting and __connman_device_disconnect
fixes this. Connman logic is not effected due to the way how flags
connected and associating are handled in __connman_network_connect
and __connman_network_disconnect.
  • Loading branch information
vvavrychuk authored and LaakkonenJussi committed Mar 12, 2021
1 parent a3a4a14 commit baa5403
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connman/src/network.c
Expand Up @@ -1481,10 +1481,10 @@ int __connman_network_connect(struct connman_network *network)
if (!network->device)
return -ENODEV;

network->connecting = true;

__connman_device_disconnect(network->device);

network->connecting = true;

err = network->driver->connect(network);
if (err < 0) {
if (err == -EINPROGRESS)
Expand Down

0 comments on commit baa5403

Please sign in to comment.