From: Sebastian Harl Date: Fri, 21 Feb 2014 02:16:27 +0000 (+0100) Subject: store_lookup: Fix matching of services with empty attr matcher. X-Git-Tag: sysdb-0.1.0~192 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=59d10e2922b8aed1c7f2a688aaaa5131ecaacef7;p=sysdb.git store_lookup: Fix matching of services with empty attr matcher. --- diff --git a/src/core/store_lookup.c b/src/core/store_lookup.c index 26e4666..e0eedf0 100644 --- a/src/core/store_lookup.c +++ b/src/core/store_lookup.c @@ -166,6 +166,9 @@ match_service(service_matcher_t *m, sdb_store_base_t *obj) if (obj->type != SDB_SERVICE) return -1; + if (! m->attr) + return 0; + iter = sdb_llist_get_iter(SDB_STORE_OBJ(obj)->attributes); while (sdb_llist_iter_has_next(iter)) { sdb_store_base_t *attr = STORE_BASE(sdb_llist_iter_get_next(iter));