X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Fcore%2Fstore_expr.c;h=6e39305a89ecd18718ad7984a4e7cc85f407728d;hp=60b0bea130a8c50f85c12b6c1b6d9cf91ebc6a25;hb=da52b4da948c741d20c7a3995ce5d133af377def;hpb=5a570b8e22d3972dc5e2b9ba386afce5fa7d688e diff --git a/src/core/store_expr.c b/src/core/store_expr.c index 60b0bea..6e39305 100644 --- a/src/core/store_expr.c +++ b/src/core/store_expr.c @@ -167,7 +167,7 @@ sdb_store_expr_fieldvalue(int field) sdb_data_t value = { SDB_TYPE_INTEGER, { .integer = field } }; sdb_store_expr_t *e; - if ((field < SDB_FIELD_NAME) || (SDB_FIELD_BACKEND < field)) + if ((field < SDB_FIELD_NAME) || (SDB_FIELD_VALUE < field)) return NULL; e = SDB_STORE_EXPR(sdb_object_create("store-fieldvalue", expr_type, FIELD_VALUE, NULL, NULL, &value)); @@ -286,7 +286,12 @@ sdb_store_expr_iterable(sdb_store_expr_t *expr, int context) if ((context != SDB_HOST) && (context != SDB_SERVICE) && (context != SDB_METRIC) && (context != SDB_ATTRIBUTE)) return 0; - return expr->data.data.integer == SDB_FIELD_BACKEND; + if (expr->data.data.integer == SDB_FIELD_BACKEND) + return 1; + else if (expr->data.data.integer == SDB_FIELD_VALUE) + /* we don't current support this just like when using + * the attribute[] syntax */ + return 0; } else if (! expr->type) { return !!(expr->data.type & SDB_TYPE_ARRAY);