From 73f3dbe65643956dd1d872730cdd08c71cd076c5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 2 Oct 2017 09:36:09 +0200 Subject: disconnect CADET only after client count hits zero --- src/datastore/plugin_datastore_sqlite.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/datastore/plugin_datastore_sqlite.c') diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c index 2d539cb19..cc56f5959 100644 --- a/src/datastore/plugin_datastore_sqlite.c +++ b/src/datastore/plugin_datastore_sqlite.c @@ -355,40 +355,24 @@ database_setup (const struct GNUNET_CONFIGURATION_Handle *cfg, (SQLITE_OK != sq_prepare (plugin->dbh, "SELECT " RESULT_COLUMNS " FROM gn091 " -#if SQLITE_VERSION_NUMBER >= 3007000 - "INDEXED BY idx_repl_rvalue " -#endif "WHERE repl=?2 AND " " (rvalue>=?1 OR " " NOT EXISTS (SELECT 1 FROM gn091 " -#if SQLITE_VERSION_NUMBER >= 3007000 - "INDEXED BY idx_repl_rvalue " -#endif "WHERE repl=?2 AND rvalue>=?1 LIMIT 1) ) " "ORDER BY rvalue ASC LIMIT 1", &plugin->selRepl)) || (SQLITE_OK != sq_prepare (plugin->dbh, - "SELECT MAX(repl) FROM gn091" -#if SQLITE_VERSION_NUMBER >= 3007000 - " INDEXED BY idx_repl_rvalue" -#endif - "", + "SELECT MAX(repl) FROM gn091", &plugin->maxRepl)) || (SQLITE_OK != sq_prepare (plugin->dbh, "SELECT " RESULT_COLUMNS " FROM gn091 " -#if SQLITE_VERSION_NUMBER >= 3007000 - "INDEXED BY idx_expire " -#endif "WHERE NOT EXISTS (SELECT 1 FROM gn091 WHERE expire < ?1 LIMIT 1) OR (expire < ?1) " "ORDER BY expire ASC LIMIT 1", &plugin->selExpi)) || (SQLITE_OK != sq_prepare (plugin->dbh, "SELECT " RESULT_COLUMNS " FROM gn091 " -#if SQLITE_VERSION_NUMBER >= 3007000 - "INDEXED BY idx_anon_type " -#endif "WHERE _ROWID_ >= ? AND " "anonLevel = 0 AND " "type = ? " -- cgit v1.2.3