Hi Marcel: The patch will check whether the new created service is created from 00_00_00_00_00_00 network, if it is, will close the auto-connect.
>From 160faaa417f7a3b251febb72053d25e39c1d6f59 Mon Sep 17 00:00:00 2001 From: Martin Xu <[email protected]> Date: Thu, 9 Jul 2009 00:02:58 -0400 Subject: [PATCH 5/5] do not auto connect when create 00_00_00_00_00_00 network --- src/service.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/service.c b/src/service.c index 7236a96..d972166 100644 --- a/src/service.c +++ b/src/service.c @@ -1423,8 +1423,9 @@ static void update_from_network(struct connman_service *service, struct connman_service *__connman_service_create_from_network(struct connman_network *network) { struct connman_service *service; - const char *ident, *group; + const char *ident, *group, *identifier; char *name; + connman_bool_t auto_connect = TRUE; service = __connman_service_lookup_from_network(network); if (service != NULL) { @@ -1432,6 +1433,10 @@ struct connman_service *__connman_service_create_from_network(struct connman_net return service; } + identifier = connman_network_get_identifier(network); + if (g_strcmp0(identifier, "00_00_00_00_00_00") == 0) + auto_connect = FALSE; + ident = __connman_network_get_ident(network); if (ident == NULL) return NULL; @@ -1465,7 +1470,7 @@ struct connman_service *__connman_service_create_from_network(struct connman_net service_register(service); - if (service->favorite == TRUE) + if (service->favorite == TRUE && auto_connect == TRUE) __connman_service_auto_connect(); done: -- 1.6.1.3 _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
