From: Sebastian Harl Date: Thu, 19 Jun 2014 14:41:23 +0000 (+0200) Subject: store_lookup: Let attribute matchers check the attribute name. X-Git-Tag: sysdb-0.2.0~51 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c0598ba4caacc57940cf01d90bc523e976023158;p=sysdb.git store_lookup: Let attribute matchers check the attribute name. --- diff --git a/src/core/store_lookup.c b/src/core/store_lookup.c index fe98e91..f2d8cc7 100644 --- a/src/core/store_lookup.c +++ b/src/core/store_lookup.c @@ -243,6 +243,9 @@ match_attr(sdb_store_matcher_t *m, sdb_store_base_t *obj) sdb_attribute_t *attr = SDB_ATTR(sdb_llist_iter_get_next(iter)); char buf[sdb_data_strlen(&attr->value) + 1]; + if (ATTR_M(m)->name && strcasecmp(ATTR_M(m)->name, SDB_OBJ(attr)->name)) + continue; + if (sdb_data_format(&attr->value, buf, sizeof(buf), SDB_UNQUOTED) <= 0) return 0; if (match_obj_name(&ATTR_M(m)->value, buf)) {