Code

store: Drop unused sdb_store_has_host.
authorSebastian Harl <sh@tokkee.org>
Fri, 22 May 2015 07:21:26 +0000 (09:21 +0200)
committerSebastian Harl <sh@tokkee.org>
Fri, 22 May 2015 07:21:26 +0000 (09:21 +0200)
src/core/store.c
src/include/core/store.h

index 22e965ff1858c9891cbf862e3f1af7e91d50a6c8..f672c120a3c646b3893f06583a717b13ad9f22cf 100644 (file)
@@ -858,19 +858,6 @@ sdb_store_clear(void)
        sdb_avltree_clear(global_store->hosts);
 } /* sdb_store_clear */
 
        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)
 {
 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 */
 
        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)
 int
 sdb_store_fetch_timeseries(const char *hostname, const char *metric,
                sdb_timeseries_opts_t *opts, sdb_strbuf_t *buf)
index 15f435fefdc6136a83fdb2e53a004a5cac82e8a9..20ca047b9473c28bdb2867bc0259a50419467ad0 100644 (file)
@@ -246,16 +246,12 @@ void
 sdb_store_clear(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:
  * 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);
 
 sdb_store_obj_t *
 sdb_store_get_host(const char *name);