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

index 8be3b25..9adc315 100644 (file)
@@ -240,7 +240,7 @@ int connman_task_set_notify(struct connman_task *task, const char *member,
        notify->func = function;
        notify->data = user_data;
 
-       g_hash_table_insert(task->notify, g_strdup(member), notify);
+       g_hash_table_replace(task->notify, g_strdup(member), notify);
 
        return 0;
 }