summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb2335d)
raw | patch | inline | side by side (parent: fb2335d)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 17 Jan 2015 00:08:06 +0000 (01:08 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 17 Jan 2015 00:08:06 +0000 (01:08 +0100) |
In this case, the object type is a bit-wise OR of the parent type and the
attribute type.
attribute type.
src/frontend/store.c | patch | blob | history |
diff --git a/src/frontend/store.c b/src/frontend/store.c
index 7285b349b39be9994b92add89167bb3aaaacb174..cb87ed4e5e3716f15ea55c1848c264fc358f6c03 100644 (file)
--- a/src/frontend/store.c
+++ b/src/frontend/store.c
}
return sdb_fe_store_metric(conn, &metric);
}
- case SDB_ATTRIBUTE:
- {
- sdb_proto_attribute_t attr;
- if (sdb_proto_unmarshal_attribute(buf, len, &attr) < 0) {
- sdb_strbuf_sprintf(conn->errbuf,
- "STORE: Failed to unmarshal attribute object");
- return -1;
- }
- return sdb_fe_store_attribute(conn, &attr);
+ }
+ if (type & SDB_ATTRIBUTE) {
+ sdb_proto_attribute_t attr;
+ if (sdb_proto_unmarshal_attribute(buf, len, &attr) < 0) {
+ sdb_strbuf_sprintf(conn->errbuf,
+ "STORE: Failed to unmarshal attribute object");
+ return -1;
}
+ return sdb_fe_store_attribute(conn, &attr);
}
sdb_log(SDB_LOG_ERR, "frontend: Invalid object type %d for "