This a fix for BMC#9985. This bug caused by calling
 __connman_profile_add_network twice for ofono network which
cause to have refcount set to two for this network.
Calling connman_network_set_group from probe cause this problem
so we need to move calling this function after we create the network.
---
 plugins/ofono.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index 691037d..47afe13 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -363,7 +363,6 @@ static void create_service(struct connman_network *network)
 
 static int network_probe(struct connman_network *network)
 {
-       create_service(network);
        return 0;
 }
 
@@ -540,6 +539,9 @@ static int add_network(struct connman_device *device,
        hash_path = connman_network_get_string(network, "Path");
        if (hash_path == NULL)
                goto error;
+
+       create_service(network);
+
        connman_network_ref(network);
        g_hash_table_insert(network_hash, (char *)hash_path, network);
 
-- 
1.7.2.3

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to