diff options
Diffstat (limited to 'src/auditordb/plugin_auditordb_postgres.c')
-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, | |||
2228 | GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id), | 2228 | GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id), |
2229 | GNUNET_PQ_query_param_uint64 (&pp->last_wire_out_serial_id), | 2229 | GNUNET_PQ_query_param_uint64 (&pp->last_wire_out_serial_id), |
2230 | GNUNET_PQ_query_param_fixed_size (in_wire_off, | 2230 | GNUNET_PQ_query_param_fixed_size (in_wire_off, |
2231 | wire_off_size), | 2231 | NULL == in_wire_off |
2232 | ? 0 | ||
2233 | : wire_off_size), | ||
2232 | GNUNET_PQ_query_param_fixed_size (out_wire_off, | 2234 | GNUNET_PQ_query_param_fixed_size (out_wire_off, |
2233 | wire_off_size), | 2235 | NULL == out_wire_off |
2236 | ? 0 | ||
2237 | : wire_off_size), | ||
2234 | GNUNET_PQ_query_param_end | 2238 | GNUNET_PQ_query_param_end |
2235 | }; | 2239 | }; |
2236 | 2240 | ||
@@ -2269,9 +2273,13 @@ postgres_update_wire_auditor_account_progress (void *cls, | |||
2269 | GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id), | 2273 | GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id), |
2270 | GNUNET_PQ_query_param_uint64 (&pp->last_wire_out_serial_id), | 2274 | GNUNET_PQ_query_param_uint64 (&pp->last_wire_out_serial_id), |
2271 | GNUNET_PQ_query_param_fixed_size (in_wire_off, | 2275 | GNUNET_PQ_query_param_fixed_size (in_wire_off, |
2272 | wire_off_size), | 2276 | NULL == in_wire_off |
2277 | ? 0 | ||
2278 | : wire_off_size), | ||
2273 | GNUNET_PQ_query_param_fixed_size (out_wire_off, | 2279 | GNUNET_PQ_query_param_fixed_size (out_wire_off, |
2274 | wire_off_size), | 2280 | NULL == out_wire_off |
2281 | ? 0 | ||
2282 | : wire_off_size), | ||
2275 | GNUNET_PQ_query_param_auto_from_type (master_pub), | 2283 | GNUNET_PQ_query_param_auto_from_type (master_pub), |
2276 | GNUNET_PQ_query_param_string (account_name), | 2284 | GNUNET_PQ_query_param_string (account_name), |
2277 | GNUNET_PQ_query_param_end | 2285 | GNUNET_PQ_query_param_end |
@@ -2340,7 +2348,11 @@ postgres_get_wire_auditor_account_progress (void *cls, | |||
2340 | *wire_off_size = 0; | 2348 | *wire_off_size = 0; |
2341 | xsize = 0; | 2349 | xsize = 0; |
2342 | } | 2350 | } |
2343 | GNUNET_assert (xsize == *wire_off_size); | 2351 | if ( (0 != xsize) && |
2352 | (0 != *wire_off_size) ) | ||
2353 | { | ||
2354 | GNUNET_assert (xsize == *wire_off_size); | ||
2355 | } | ||
2344 | return qs; | 2356 | return qs; |
2345 | } | 2357 | } |
2346 | 2358 | ||