diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-02-07 15:02:49 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-02-07 15:02:49 +0100 |
commit | d67011e2b55dbd0e2158c4c144f5092e1593d70a (patch) | |
tree | ce793ac6c737bf6760062f085610966a257e5cae /src/pq/pq_result_helper.c | |
parent | 38378f38d7c90c237bb8dbbe6fb4afb0c87f0c9f (diff) |
making mintdb tests pass again after API refactoring to remove total amount
Diffstat (limited to 'src/pq/pq_result_helper.c')
-rw-r--r-- | src/pq/pq_result_helper.c | 22 |
1 files changed, 18 insertions, 4 deletions
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, |