summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2011-07-08 20:04:37 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2011-07-08 20:01:36 +0200
commit21eefd4611ff25fe99a3fdb8c2502978a780c948 (patch)
tree3c98fe2c088fd22f51c0ef77dc538f725f159db2
parentd5fcad5c684b81db393899ab5f0927299d4fb3ec (diff)
downloadconnman-21eefd4611ff25fe99a3fdb8c2502978a780c948.tar.gz
connman-21eefd4611ff25fe99a3fdb8c2502978a780c948.tar.bz2
connman-21eefd4611ff25fe99a3fdb8c2502978a780c948.zip
service: disconnect state has priority over online one.
-rw-r--r--src/service.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index 495e4dea..bfd94a50 100644
--- a/src/service.c
+++ b/src/service.c
@@ -381,12 +381,18 @@ static enum connman_service_state combine_state(
}
if (state_a == CONNMAN_SERVICE_STATE_ONLINE) {
- result = state_a;
+ if (state_b == CONNMAN_SERVICE_STATE_DISCONNECT)
+ result = state_b;
+ else
+ result = state_a;
goto done;
}
if (state_b == CONNMAN_SERVICE_STATE_ONLINE) {
- result = state_b;
+ if (state_a == CONNMAN_SERVICE_STATE_DISCONNECT)
+ result = state_a;
+ else
+ result = state_b;
goto done;
}