From 07e184c400bb2061279e084a065a628599183445 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 22 May 2015 09:21:26 +0200 Subject: [PATCH] store: Drop unused sdb_store_has_host. --- src/core/store.c | 15 ++------------- src/include/core/store.h | 8 ++------ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/core/store.c b/src/core/store.c index 22e965f..f672c12 100644 --- a/src/core/store.c +++ b/src/core/store.c @@ -858,19 +858,6 @@ sdb_store_clear(void) sdb_avltree_clear(global_store->hosts); } /* sdb_store_clear */ -bool -sdb_store_has_host(const char *name) -{ - sdb_host_t *host; - - if ((! global_store) || (! name)) - return false; - - host = lookup_host(global_store, name, /* canonicalize = */ 0); - sdb_object_deref(SDB_OBJ(host)); - return host != NULL; -} /* sdb_store_has_host */ - sdb_store_obj_t * sdb_store_get_host(const char *name) { @@ -990,6 +977,8 @@ sdb_store_get_attr(sdb_store_obj_t *obj, const char *name, sdb_data_t *res, return 0; } /* sdb_store_get_attr */ +/* TODO: sdb_store_fetch_timeseries should move into the plugin module */ + int sdb_store_fetch_timeseries(const char *hostname, const char *metric, sdb_timeseries_opts_t *opts, sdb_strbuf_t *buf) diff --git a/src/include/core/store.h b/src/include/core/store.h index 15f435f..20ca047 100644 --- a/src/include/core/store.h +++ b/src/include/core/store.h @@ -246,16 +246,12 @@ void sdb_store_clear(void); /* - * sdb_store_has_host: * sdb_store_get_host: * Query the store for a host by its (canonicalized) name. * - * sdb_store_get_host increments the ref count of the host object. The caller - * needs to deref it when no longer using it. + * The function increments the ref count of the host object. The caller needs + * to deref it when no longer using it. */ -bool -sdb_store_has_host(const char *name); - sdb_store_obj_t * sdb_store_get_host(const char *name); -- 2.30.2