summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-17 10:34:23 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-18 10:26:51 (GMT)
commitbcad31fc191572bca240dd84605ab52e268c38bf (patch)
treeb8c71c3344945e1b8bb5a70971332035673a713e
parent67d8629f4abc46433ea82e68b90ecb412611d6b7 (diff)
downloadconnman-bcad31fc191572bca240dd84605ab52e268c38bf.zip
connman-bcad31fc191572bca240dd84605ab52e268c38bf.tar.gz
connman-bcad31fc191572bca240dd84605ab52e268c38bf.tar.bz2
service: Fix default service switching and setting gateway
Calling switch_default_service() didn't change the service order since the services were already sorted that way. Also update the gateway immediately.
-rw-r--r--src/service.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/service.c b/src/service.c
index 712aa9a..b85e604 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4932,8 +4932,9 @@ static int service_update_preferred_order(struct connman_service *default_servic
return -EALREADY;
if (new_service->type == tech_array[i]) {
- switch_default_service(new_service,
- default_service);
+ switch_default_service(default_service,
+ new_service);
+ __connman_connection_update_gateway();
return 0;
}
}