From 7b20ee8c8d691c0d79403462411ec66c5ada36c4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 26 Aug 2019 03:16:36 +0200 Subject: minor auditor report generation bugfixes: --- src/auditordb/plugin_auditordb_postgres.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'src/auditordb/plugin_auditordb_postgres.c') diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c index 555c3058b..daa1c1418 100644 --- a/src/auditordb/plugin_auditordb_postgres.c +++ b/src/auditordb/plugin_auditordb_postgres.c @@ -2228,9 +2228,13 @@ postgres_insert_wire_auditor_account_progress (void *cls, GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id), GNUNET_PQ_query_param_uint64 (&pp->last_wire_out_serial_id), GNUNET_PQ_query_param_fixed_size (in_wire_off, - wire_off_size), + NULL == in_wire_off + ? 0 + : wire_off_size), GNUNET_PQ_query_param_fixed_size (out_wire_off, - wire_off_size), + NULL == out_wire_off + ? 0 + : wire_off_size), GNUNET_PQ_query_param_end }; @@ -2269,9 +2273,13 @@ postgres_update_wire_auditor_account_progress (void *cls, GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id), GNUNET_PQ_query_param_uint64 (&pp->last_wire_out_serial_id), GNUNET_PQ_query_param_fixed_size (in_wire_off, - wire_off_size), + NULL == in_wire_off + ? 0 + : wire_off_size), GNUNET_PQ_query_param_fixed_size (out_wire_off, - wire_off_size), + NULL == out_wire_off + ? 0 + : wire_off_size), GNUNET_PQ_query_param_auto_from_type (master_pub), GNUNET_PQ_query_param_string (account_name), GNUNET_PQ_query_param_end @@ -2340,7 +2348,11 @@ postgres_get_wire_auditor_account_progress (void *cls, *wire_off_size = 0; xsize = 0; } - GNUNET_assert (xsize == *wire_off_size); + if ( (0 != xsize) && + (0 != *wire_off_size) ) + { + GNUNET_assert (xsize == *wire_off_size); + } return qs; } -- cgit v1.2.3