device: use g_hash_table_replace instead of insert function
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tue, 17 Apr 2012 10:54:24 +0000 (13:54 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 17 Apr 2012 11:31:22 +0000 (13:31 +0200)
src/device.c

index e7568f6..0a3c690 100644 (file)
@@ -972,7 +972,7 @@ int connman_device_add_network(struct connman_device *device,
 
        __connman_network_set_device(network, device);
 
-       g_hash_table_insert(device->networks, g_strdup(identifier),
+       g_hash_table_replace(device->networks, g_strdup(identifier),
                                                                network);
 
        return 0;