From 7d32881a36c4e6e8fe0dc67a799f2e07a07afdcd Mon Sep 17 00:00:00 2001 From: Christophe Genevey Metat Date: Fri, 29 Jul 2016 14:33:34 +0000 Subject: fix fragment_select function --- src/psycstore/plugin_psycstore_mysql.c | 15 +++++++++++++++ src/psycstore/test_plugin_psycstore.c | 1 + 2 files changed, 16 insertions(+) (limited to 'src') diff --git a/src/psycstore/plugin_psycstore_mysql.c b/src/psycstore/plugin_psycstore_mysql.c index 94179872f..29ccf1a47 100644 --- a/src/psycstore/plugin_psycstore_mysql.c +++ b/src/psycstore/plugin_psycstore_mysql.c @@ -1155,6 +1155,21 @@ fragment_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stm int ret = GNUNET_SYSERR; int sql_ret; + if(NULL == plugin->mc) + { + fprintf(stderr, "bla\n"); + } + + if(NULL == stmt) + { + fprintf(stderr, "blo\n" ); + } + + if(NULL == params) + { + fprintf(stderr, "toot\n" ); + } + sql_ret = GNUNET_MY_exec_prepared (plugin->mc, stmt, params); diff --git a/src/psycstore/test_plugin_psycstore.c b/src/psycstore/test_plugin_psycstore.c index 0959da642..53971bf23 100644 --- a/src/psycstore/test_plugin_psycstore.c +++ b/src/psycstore/test_plugin_psycstore.c @@ -267,6 +267,7 @@ run (void *cls, char *const *args, const char *cfgfile, GNUNET_OK == db->fragment_get (db->cls, &channel_pub_key, fragment_id, fragment_id, &ret_frags, fragment_cb, &fcls)); + GNUNET_assert (fcls.n == 1); struct GNUNET_MULTICAST_MessageHeader *msg1 -- cgit v1.2.3