From 172c9bbdfdd7054663efd59e85e415c7ddafe1be Mon Sep 17 00:00:00 2001 From: Gabor X Toth <*@tg-x.net> Date: Wed, 12 Oct 2016 16:41:40 +0000 Subject: [PATCH] psycstore: fix limit --- src/psycstore/plugin_psycstore_mysql.c | 4 ++++ src/psycstore/plugin_psycstore_sqlite.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/psycstore/plugin_psycstore_mysql.c b/src/psycstore/plugin_psycstore_mysql.c index 010673341..e847ffd07 100644 --- a/src/psycstore/plugin_psycstore_mysql.c +++ b/src/psycstore/plugin_psycstore_mysql.c @@ -1222,6 +1222,10 @@ message_get (void *cls, struct Plugin *plugin = cls; struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_messages; int ret; + + if (0 == fragment_limit) + fragment_limit = UINT64_MAX; + struct GNUNET_MY_QueryParam params_select[] = { GNUNET_MY_query_param_auto_from_type (channel_key), GNUNET_MY_query_param_uint64 (&first_message_id), diff --git a/src/psycstore/plugin_psycstore_sqlite.c b/src/psycstore/plugin_psycstore_sqlite.c index 83ede6e41..e6f795971 100644 --- a/src/psycstore/plugin_psycstore_sqlite.c +++ b/src/psycstore/plugin_psycstore_sqlite.c @@ -1214,7 +1214,7 @@ message_get (void *cls, || SQLITE_OK != sqlite3_bind_int64 (stmt, 4, (0 != fragment_limit) ? fragment_limit - : -1)) + : INT64_MAX)) { LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, "sqlite3_bind"); -- 2.25.1