summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bcf3822)
raw | patch | inline | side by side (parent: bcf3822)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 2 Oct 2013 19:54:35 +0000 (21:54 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 2 Oct 2013 19:54:35 +0000 (21:54 +0200) |
src/core/store.c | patch | blob | history |
diff --git a/src/core/store.c b/src/core/store.c
index 43a7a6bda20d1228f8fa6b389a5c9710d92936a2..19faee43994bdde816a6a84f4c09061bfb25bb4f 100644 (file)
--- a/src/core/store.c
+++ b/src/core/store.c
}
/* TODO: only look into direct children? */
- if (type == SDB_ATTRIBUTE)
+ if (type == SDB_HOST)
+ /* make sure that each host is unique */
+ old = STORE_OBJ(sdb_store_lookup_in_list(obj_list, type, name));
+ else if (type == SDB_ATTRIBUTE)
old = STORE_OBJ(sdb_llist_search_by_name(parent_list, name));
else
old = STORE_OBJ(sdb_store_lookup_in_list(parent_list, type, name));