Code

store::memory: Add a plugin providing an in-memory store.
[sysdb.git] / src / tools / sysdbd / main.c
index ce54313542df26cd254847d601f01fc14413d74a..759eee2f5652ebee72c9131d22a05ddbf8f704b2 100644 (file)
@@ -181,31 +181,6 @@ daemonize(void)
        return 0;
 } /* daemonize */
 
-static int
-store_init(void)
-{
-       sdb_store_t *store = sdb_store_create();
-
-       if (! store) {
-               sdb_log(SDB_LOG_ERR, "store: Failed to allocate store");
-               return -1;
-       }
-       if (sdb_plugin_register_writer("memstore",
-                               &sdb_store_writer, SDB_OBJ(store))) {
-               sdb_object_deref(SDB_OBJ(store));
-               return -1;
-       }
-       if (sdb_plugin_register_reader("memstore",
-                               &sdb_store_reader, SDB_OBJ(store))) {
-               sdb_object_deref(SDB_OBJ(store));
-               return -1;
-       }
-
-       /* Pass ownership to the plugins */
-       sdb_object_deref(SDB_OBJ(store));
-       return 0;
-} /* store_init */
-
 static int
 configure(void)
 {
@@ -219,10 +194,6 @@ configure(void)
                                        "\tCheck other error messages for details.");
                return 1;
        }
-       if (store_init()) {
-               sdb_log(SDB_LOG_ERR, "Failed to initialize the store");
-               return 1;
-       }
 
        if (! listen_addresses) {
                listen_addresses = default_listen_addresses;