From: Sebastian Harl Date: Wed, 2 Apr 2014 10:23:37 +0000 (+0200) Subject: frontend: Let LIST not include details. X-Git-Tag: sysdb-0.1.0~154 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8f340af6edef3f5a7f6b5e13ff960ade8abc3f24;p=sysdb.git frontend: Let LIST not include details. Now that we have FETCH and LOOKUP, list should only provide basic information (name and last_update). --- diff --git a/src/frontend/query.c b/src/frontend/query.c index 759b9c9..0b582f5 100644 --- a/src/frontend/query.c +++ b/src/frontend/query.c @@ -133,7 +133,7 @@ sdb_fe_list(sdb_conn_t *conn) return -1; } - if (sdb_store_tojson(buf, /* flags = */ 0)) { + if (sdb_store_tojson(buf, /* flags = */ SDB_SKIP_ALL)) { sdb_log(SDB_LOG_ERR, "frontend: Failed to serialize " "store to JSON"); sdb_strbuf_sprintf(conn->errbuf, "Out of memory"); diff --git a/src/include/core/store.h b/src/include/core/store.h index e09483f..1dfa9ab 100644 --- a/src/include/core/store.h +++ b/src/include/core/store.h @@ -224,6 +224,8 @@ enum { SDB_SKIP_ATTRIBUTES = 1 << 0, SDB_SKIP_SERVICES = 1 << 1, SDB_SKIP_SERVICE_ATTRIBUTES = 1 << 2, + + SDB_SKIP_ALL = 0xffff, }; /*