X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Fparser%2Fanalyzer.c;h=e03cbdbc3d2e9ff259e9d18f6729bf9751e920b7;hp=01539edbe71f870de8486b52320caa6dd9fa4444;hb=c09b65cba8220b49bb25b1ba6c6ffd2f6e850583;hpb=cc35394b0c4af9ccfbe7b0a18713758a9f29d247 diff --git a/src/parser/analyzer.c b/src/parser/analyzer.c index 01539ed..e03cbdb 100644 --- a/src/parser/analyzer.c +++ b/src/parser/analyzer.c @@ -347,7 +347,7 @@ analyze_typed(int context, sdb_ast_typed_t *t, sdb_strbuf_t *errbuf) /* self-references are allowed and services and metrics may reference * their parent host; everything may reference attributes */ - if ((context != t->type) && (context != UNSPEC_CONTEXT) + if ((context != t->type) && (context > 0) && (((context != SDB_SERVICE) && (context != SDB_METRIC)) || (t->type != SDB_HOST)) && (t->type != SDB_ATTRIBUTE)) {