[PATCH] service: Fix multiple technology support

Otavio Salvador otavio at ossystems.com.br
Fri Nov 30 06:44:19 PST 2012


When "SingleConnectedTechnology" setting is "false" we should iterate
over all services to check if others has autoconnect set.

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---
 src/service.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/service.c b/src/service.c
index 67889de..7ea46ea 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3407,8 +3407,11 @@ static connman_bool_t auto_connect_service(GSequenceIter* iter,
 		if (service->pending != NULL)
 			return TRUE;
 
-		if (is_connecting(service) == TRUE)
+		if (is_connecting(service) == TRUE) {
+			if (connman_setting_get_bool("SingleConnectedTechnology") == FALSE)
+				goto next_service;
 			return TRUE;
+		}
 
 		if (service->favorite == FALSE) {
 			if (preferred == TRUE)
@@ -3416,8 +3419,11 @@ static connman_bool_t auto_connect_service(GSequenceIter* iter,
 			return FALSE;
 		}
 
-		if (is_connected(service) == TRUE)
+		if (is_connected(service) == TRUE) {
+			if (connman_setting_get_bool("SingleConnectedTechnology") == FALSE)
+				goto next_service;
 			return TRUE;
+		}
 
 		if (is_ignore(service) == FALSE && service->state ==
 				CONNMAN_SERVICE_STATE_IDLE)
-- 
1.7.10.4




More information about the connman mailing list