summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 113ddda)
raw | patch | inline | side by side (parent: 113ddda)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 23 Oct 2014 19:28:15 +0000 (21:28 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 23 Oct 2014 19:28:15 +0000 (21:28 +0200) |
However, the parser will not accept attributes in LIST commands as before.
Still, an attribute is considered to be a stored object.
Still, an attribute is considered to be a stored object.
src/core/store_lookup.c | patch | blob | history | |
src/frontend/grammar.y | patch | blob | history |
index 7b2dcd6a246c1793412bd671d63ef3d29a81d6fd..9c2a68d21a4acce7a3abecbc6fa9067bd1ef21c7 100644 (file)
--- a/src/core/store_lookup.c
+++ b/src/core/store_lookup.c
return SDB_SERVICE;
else if (! strcasecmp(name, "metrics"))
return SDB_METRIC;
+ else if (! strcasecmp(name, "attributes"))
+ return SDB_ATTRIBUTE;
return -1;
} /* sdb_store_parse_object_type_plural */
diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y
index 722796c282726e5bc1f257bb6b6974f032064920..435b24719f3ad09173edd9463df6f664ce727c71 100644 (file)
--- a/src/frontend/grammar.y
+++ b/src/frontend/grammar.y
LIST IDENTIFIER filter_clause
{
int type = sdb_store_parse_object_type_plural($2);
- if (type < 0) {
+ if ((type < 0) || (type == SDB_ATTRIBUTE)) {
char errmsg[strlen($2) + 32];
snprintf(errmsg, sizeof(errmsg),
YY_("unknown data-source %s"), $2);