From: Sebastian Harl Date: Thu, 23 Oct 2014 19:01:26 +0000 (+0200) Subject: store: Let child matcher actually match the child. X-Git-Tag: sysdb-0.6.0~72 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bc8fd5bf634bd6cd1ae9afa03da3390d7fe8b0dc;p=sysdb.git store: Let child matcher actually match the child. --- diff --git a/src/core/store_lookup.c b/src/core/store_lookup.c index 6613c21..4179df4 100644 --- a/src/core/store_lookup.c +++ b/src/core/store_lookup.c @@ -188,12 +188,11 @@ match_child(sdb_store_matcher_t *m, sdb_store_obj_t *obj, iter = sdb_avltree_get_iter(HOST(obj)->attributes); while (sdb_avltree_iter_has_next(iter)) { - sdb_object_t *child = sdb_avltree_iter_get_next(iter); - if (filter && (! sdb_store_matcher_matches(filter, - STORE_OBJ(child), NULL))) + sdb_store_obj_t *child = STORE_OBJ(sdb_avltree_iter_get_next(iter)); + if (filter && (! sdb_store_matcher_matches(filter, child, NULL))) continue; - if (sdb_store_matcher_matches(CHILD_M(m)->m, obj, filter)) { + if (sdb_store_matcher_matches(CHILD_M(m)->m, child, filter)) { status = 1; break; }