Code

frontend: Let FETCH apply filters to the host as well.
[sysdb.git] / src / frontend / query.c
index 1cb32dd307098f1290f011f3f83104bf97a5604b..e9c2d2212965638bf74dbbfd57e7ef3c1e72ca25 100644 (file)
@@ -273,7 +273,8 @@ sdb_fe_exec_fetch(sdb_conn_t *conn, int type, const char *name,
        }
 
        host = sdb_store_get_host(name);
-       if (! host) {
+       if ((! host) || (filter
+                               && (! sdb_store_matcher_matches(filter, host, NULL)))) {
                sdb_log(SDB_LOG_DEBUG, "frontend: Failed to fetch host '%s': "
                                "not found", name);