From d67011e2b55dbd0e2158c4c144f5092e1593d70a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 7 Feb 2016 15:02:49 +0100 Subject: making mintdb tests pass again after API refactoring to remove total amount --- src/pq/pq_result_helper.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'src/pq') diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index c8b3b01fc..748ce0c29 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c @@ -72,11 +72,25 @@ extract_amount_nbo_helper (PGresult *result, frac_name); curr_num = PQfnumber (result, curr_name); - if ( (val_num < 0) || - (frac_num < 0) || - (curr_num < 0) ) + if (val_num < 0) { - GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Field `%s' does not exist in result\n", + val_name); + return GNUNET_SYSERR; + } + if (frac_num < 0) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Field `%s' does not exist in result\n", + frac_name); + return GNUNET_SYSERR; + } + if (curr_num < 0) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Field `%s' does not exist in result\n", + curr_name); return GNUNET_SYSERR; } if ( (PQgetisnull (result, -- cgit v1.2.3