Do not remove network on transition to DISCONNECTED state, it will
be done when connection anyway. Also merge DISCONNECTED and INACTIVE
states into one.
connman_network_set_connected(task->network, TRUE);
break;
- case WPA_DISCONNECTED:
- remove_network(task);
-
- /* carrier off */
- connman_network_set_connected(task->network, FALSE);
-
- if (task->disconnecting == TRUE) {
- connman_network_unref(task->network);
- task->disconnecting = FALSE;
-
- if (task->pending_network != NULL) {
- task->network = task->pending_network;
- task->pending_network = NULL;
- task_connect(task);
- } else
- task->network = NULL;
- }
- break;
-
case WPA_ASSOCIATING:
switch (prevstate) {
case WPA_COMPLETED:
default:
goto badstate;
}
+ /* fall through */
+ case WPA_DISCONNECTED:
+ /* carrier off */
connman_network_set_connected(task->network, FALSE);
if (task->disconnecting == TRUE) {