diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-08-26 03:16:36 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-08-26 03:18:32 +0200 |
commit | 7b20ee8c8d691c0d79403462411ec66c5ada36c4 (patch) | |
tree | b709105fb87a9a2f976246cbd2ab0648ccb8d87b /src/auditordb | |
parent | 613217be0354a02611f5e1a34e07989e2c5d5cfe (diff) | |
download | exchange-7b20ee8c8d691c0d79403462411ec66c5ada36c4.tar.xz |
minor auditor report generation bugfixes:
Diffstat (limited to 'src/auditordb')
-rw-r--r-- | src/auditordb/plugin_auditordb_postgres.c | 22 |
1 files changed, 17 insertions, 5 deletions
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; } |