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

index 7c54541..e17a3f8 100644 (file)
--- a/src/nat.c
+++ b/src/nat.c
@@ -135,7 +135,7 @@ int __connman_nat_enable(const char *name, const char *address,
        nat->address = g_strdup(address);
        nat->prefixlen = prefixlen;
 
-       g_hash_table_insert(nat_hash, g_strdup(name), nat);
+       g_hash_table_replace(nat_hash, g_strdup(name), nat);
 
        return enable_nat(nat);
 }