summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-17 10:34:21 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-18 10:26:40 (GMT)
commitdd366065028aacf05817e4f2dc4d65c52935b28d (patch)
tree62381b51d00efd3b992a8c66b7674a9290aec47e
parentb5259176625fc30e12410d18f535802d8542b0ad (diff)
downloadconnman-dd366065028aacf05817e4f2dc4d65c52935b28d.zip
connman-dd366065028aacf05817e4f2dc4d65c52935b28d.tar.gz
connman-dd366065028aacf05817e4f2dc4d65c52935b28d.tar.bz2
service: A preferred service in state ready is good enough
Simplify the preferred service selection such that a connected service is good enough, especially since a connecting service will also terminate the search for the current preferred one.
-rw-r--r--src/service.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/service.c b/src/service.c
index 5dee4cd..712aa9a 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3408,12 +3408,8 @@ static connman_bool_t auto_connect_service(GSequenceIter* iter,
return FALSE;
}
- if (is_connected(service) == TRUE) {
- if (preferred == TRUE && service->state !=
- CONNMAN_SERVICE_STATE_ONLINE)
- goto next_service;
+ if (is_connected(service) == TRUE)
return TRUE;
- }
if (is_ignore(service) == FALSE && service->state ==
CONNMAN_SERVICE_STATE_IDLE)