From db9cb5515675c3adff9d01ac72c7c2cacc5652fa Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 15 May 2015 22:40:00 +0200 Subject: [PATCH] frontend: Fixed reply from STORE command. --- src/frontend/store.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/store.c b/src/frontend/store.c index ff56316..6cad8cd 100644 --- a/src/frontend/store.c +++ b/src/frontend/store.c @@ -162,7 +162,7 @@ sdb_fe_store_service(sdb_conn_t *conn, const sdb_proto_service_t *svc) if ((! conn) || (! svc) || (! svc->hostname) || (! svc->name)) return -1; - snprintf(name, sizeof(name), svc->hostname, svc->name); + snprintf(name, sizeof(name), "%s.%s", svc->hostname, svc->name); return store_reply(conn, SDB_SERVICE, name, sdb_store_service(svc->hostname, svc->name, svc->last_update)); } /* sdb_fe_store_service */ @@ -178,7 +178,7 @@ sdb_fe_store_metric(sdb_conn_t *conn, const sdb_proto_metric_t *metric) store.type = metric->store_type; store.id = metric->store_id; - snprintf(name, sizeof(name), metric->hostname, metric->name); + snprintf(name, sizeof(name), "%s.%s", metric->hostname, metric->name); return store_reply(conn, SDB_METRIC, name, sdb_store_metric(metric->hostname, metric->name, &store, metric->last_update)); -- 2.30.2