Upstream: network: Replace network_change() with __connman_network_disconnect() 85/78985/1
authorSaurav Babu <saurav.babu@samsung.com>
Thu, 7 Jul 2016 14:22:45 +0000 (19:52 +0530)
committerSaurav Babu <saurav.babu@samsung.com>
Thu, 7 Jul 2016 14:22:45 +0000 (19:52 +0530)
commitffac4f3e6667d2b6e1cda87303d6fdd9f2de6256
tree86685e834db98d14f6a74a5fbdc698c8b73667df
parent0a714ce6194d231e509310aa69a230e7e5914853
Upstream: network: Replace network_change() with __connman_network_disconnect()

The network_change() function called when a network error is set will
disconnect a network driver identical to __connman_network_disconnect()
but without any error handling. Therefore the specific network_change()
function is better replaced with __connman_network_disconnect(). With
connman_network_set_error() now calling __connman_network_disconnect(),
the additional function call can now be removed from
connman_network_set_connected().

Also let the associating and connecting variables be handled by the
normal code paths and don't forcefully unset them when an error happens.

Commit ID: 7a3740c4c65be7915c36daaac9b1a611fa498a2

Change-Id: I3223a9d13207898aa64e2002912516d5ad64c150
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
src/network.c