summaryrefslogtreecommitdiff
path: root/src/auditordb/plugin_auditordb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-08-26 03:16:36 +0200
committerChristian Grothoff <christian@grothoff.org>2019-08-26 03:18:32 +0200
commit7b20ee8c8d691c0d79403462411ec66c5ada36c4 (patch)
treeb709105fb87a9a2f976246cbd2ab0648ccb8d87b /src/auditordb/plugin_auditordb_postgres.c
parent613217be0354a02611f5e1a34e07989e2c5d5cfe (diff)
downloadexchange-7b20ee8c8d691c0d79403462411ec66c5ada36c4.tar.gz
exchange-7b20ee8c8d691c0d79403462411ec66c5ada36c4.tar.bz2
exchange-7b20ee8c8d691c0d79403462411ec66c5ada36c4.zip
minor auditor report generation bugfixes:
Diffstat (limited to 'src/auditordb/plugin_auditordb_postgres.c')
-rw-r--r--src/auditordb/plugin_auditordb_postgres.c22
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;
}