summaryrefslogtreecommitdiff
path: root/plugins/ofono.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-06-16 09:44:53 +0200
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2011-06-16 15:26:11 +0200
commit81530ed8aa05ce414dfa88999be5979451e0af09 (patch)
tree9320430184ad26afeeb48fc7d613433367b09cf4 /plugins/ofono.c
parent2b2cb7b5ab0cb6da76d378242575c83b8188a769 (diff)
downloadconnman-81530ed8aa05ce414dfa88999be5979451e0af09.tar.gz
connman-81530ed8aa05ce414dfa88999be5979451e0af09.tar.bz2
connman-81530ed8aa05ce414dfa88999be5979451e0af09.zip
element: Remove network code
Diffstat (limited to 'plugins/ofono.c')
-rw-r--r--plugins/ofono.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c
index 0c234623..1b9264ac 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -366,6 +366,7 @@ static void remove_network(gpointer data)
{
struct network_info *info = data;
+ connman_network_unregister(info->network);
connman_network_unref(info->network);
g_free(info);
@@ -831,8 +832,11 @@ static int add_network(struct connman_device *device,
if (network == NULL)
return -ENOMEM;
+ connman_network_register(network);
+
info = g_try_new0(struct network_info, 1);
if (info == NULL) {
+ connman_network_unregister(network);
connman_network_unref(network);
return -ENOMEM;
}
@@ -903,6 +907,7 @@ static int add_network(struct connman_device *device,
return 0;
error:
+ connman_network_unregister(network);
connman_network_unref(network);
g_hash_table_remove(network_hash, hash_path);
return -EIO;