Code

store: Drop the global (default) store.
[sysdb.git] / src / core / store.c
index e24d2ef0a5356bf0a2badc8aa5fe468f94983a4f..bea4d2b578c421ed7706791e2aee0db95524de96 100644 (file)
@@ -59,8 +59,6 @@ struct sdb_store {
        pthread_rwlock_t host_lock;
 };
 
-sdb_store_t *global_store = NULL;
-
 /*
  * private types
  */
@@ -867,32 +865,6 @@ sdb_store_create(void)
        return SDB_STORE(sdb_object_create("store", store_type));
 } /* sdb_store_create */
 
-int
-sdb_store_init(void)
-{
-       if (global_store)
-               return 0;
-
-       global_store = SDB_STORE(sdb_object_create("store", store_type));
-       if (! global_store) {
-               sdb_log(SDB_LOG_ERR, "store: Failed to allocate store");
-               return -1;
-       }
-       if (sdb_plugin_register_writer("memstore",
-                               &sdb_store_writer, SDB_OBJ(global_store)))
-               return -1;
-       return sdb_plugin_register_reader("memstore",
-                       &sdb_store_reader, SDB_OBJ(global_store));
-} /* sdb_store_init */
-
-void
-sdb_store_clear(void)
-{
-       if (! global_store)
-               return;
-       sdb_avltree_clear(global_store->hosts);
-} /* sdb_store_clear */
-
 int
 sdb_store_host(sdb_store_t *store, const char *name, sdb_time_t last_update)
 {