diff --git a/src/frontend/query.c b/src/frontend/query.c
index 759b9c9795ebbe86da1c9ab4308c0c641f7e10aa..2a6aecff6b1513856f22c9929646bb64c34367c7 100644 (file)
--- a/src/frontend/query.c
+++ b/src/frontend/query.c
*/
static int
-lookup_tojson(sdb_store_base_t *obj, void *user_data)
+lookup_tojson(sdb_store_obj_t *obj, void *user_data)
{
sdb_strbuf_t *buf = user_data;
if (sdb_strbuf_len(buf) > 1)
sdb_fe_fetch(sdb_conn_t *conn, const char *name)
{
sdb_strbuf_t *buf;
- sdb_store_base_t *host;
+ sdb_store_obj_t *host;
host = sdb_store_get_host(name);
if (! host) {
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");
sdb_strbuf_append(buf, "[");
- if (sdb_store_lookup(m, lookup_tojson, buf)) {
+ if (sdb_store_scan(m, lookup_tojson, buf)) {
sdb_log(SDB_LOG_ERR, "frontend: Failed to lookup hosts");
sdb_strbuf_sprintf(conn->errbuf, "Failed to lookup hosts");
sdb_strbuf_destroy(buf);