index 802e70ce5f2fcd789fa90c7a51376f6d23cba56d..ce8f8251dc32851a341013d506d0e748f99d1b5e 100644 (file)
--- a/src/core/memstore_exec.c
+++ b/src/core/memstore_exec.c
static int
exec_fetch(sdb_memstore_t *store,
sdb_store_writer_t *w, sdb_object_t *wd, sdb_strbuf_t *errbuf,
- int type, const char *hostname, const char *name,
+ int type, const char *hostname, const char *name, bool full,
sdb_memstore_matcher_t *filter)
{
sdb_memstore_obj_t *host;
if (type != SDB_HOST)
status = sdb_memstore_emit(obj->parent, w, wd);
- if (status || sdb_memstore_emit_full(obj, filter, w, wd)) {
+ if (! status) {
+ if (full)
+ status = sdb_memstore_emit_full(obj, filter, w, wd);
+ else
+ status = sdb_memstore_emit(obj, w, wd);
+ }
+ if (status) {
sdb_log(SDB_LOG_ERR, "memstore: Failed to serialize "
"%s %s.%s to JSON", SDB_STORE_TYPE_TO_NAME(type),
hostname, name);
case SDB_AST_TYPE_FETCH:
return exec_fetch(store, w, wd, errbuf, SDB_AST_FETCH(ast)->obj_type,
SDB_AST_FETCH(ast)->hostname, SDB_AST_FETCH(ast)->name,
- q->filter);
+ SDB_AST_FETCH(ast)->full, q->filter);
case SDB_AST_TYPE_LIST:
return exec_list(store, w, wd, errbuf, SDB_AST_LIST(ast)->obj_type,