diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2011-07-08 20:04:37 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-07-08 20:01:36 +0200 |
commit | 21eefd4611ff25fe99a3fdb8c2502978a780c948 (patch) | |
tree | 3c98fe2c088fd22f51c0ef77dc538f725f159db2 | |
parent | d5fcad5c684b81db393899ab5f0927299d4fb3ec (diff) | |
download | connman-21eefd4611ff25fe99a3fdb8c2502978a780c948.tar.gz connman-21eefd4611ff25fe99a3fdb8c2502978a780c948.tar.bz2 connman-21eefd4611ff25fe99a3fdb8c2502978a780c948.zip |
service: disconnect state has priority over online one.
-rw-r--r-- | src/service.c | 10 |
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; } |