diff options
Diffstat (limited to 'src/exchange')
| -rw-r--r-- | src/exchange/taler-exchange-httpd_aml-decision.c | 5 | ||||
| -rw-r--r-- | src/exchange/taler-exchange-httpd_aml-decisions-get.c | 15 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/exchange/taler-exchange-httpd_aml-decision.c b/src/exchange/taler-exchange-httpd_aml-decision.c index 16dc0d96..56935df5 100644 --- a/src/exchange/taler-exchange-httpd_aml-decision.c +++ b/src/exchange/taler-exchange-httpd_aml-decision.c @@ -119,7 +119,7 @@ TEH_handler_post_aml_decision ( if (0 == --retries_left) break; } while (GNUNET_DB_STATUS_SOFT_ERROR == qs); - if (qs < 0) + if (qs <= 0) { GNUNET_break (0); return TALER_MHD_reply_with_error (connection, @@ -129,6 +129,7 @@ TEH_handler_post_aml_decision ( } if (invalid_officer) { + GNUNET_break_op (0); return TALER_MHD_reply_with_error ( connection, MHD_HTTP_FORBIDDEN, @@ -136,7 +137,7 @@ TEH_handler_post_aml_decision ( NULL); } if (GNUNET_TIME_timestamp_cmp (last_date, - >, + >=, decision_time)) { GNUNET_break_op (0); diff --git a/src/exchange/taler-exchange-httpd_aml-decisions-get.c b/src/exchange/taler-exchange-httpd_aml-decisions-get.c index ad160b82..0183ac3b 100644 --- a/src/exchange/taler-exchange-httpd_aml-decisions-get.c +++ b/src/exchange/taler-exchange-httpd_aml-decisions-get.c @@ -63,10 +63,10 @@ record_cb ( GNUNET_JSON_PACK ( GNUNET_JSON_pack_data_auto ("h_payto", h_payto), - TALER_JSON_pack_amount ("threshold", - threshold), GNUNET_JSON_pack_int64 ("current_state", status), + TALER_JSON_pack_amount ("threshold", + threshold), GNUNET_JSON_pack_int64 ("rowid", row_id) ))); @@ -98,8 +98,8 @@ TEH_handler_aml_decisions_get ( else if (0 == strcmp (state_str, "frozen")) decision = TALER_AML_FROZEN; - if (0 == strcmp (state_str, - "normal")) + else if (0 == strcmp (state_str, + "normal")) decision = TALER_AML_NORMAL; else { @@ -172,10 +172,11 @@ TEH_handler_aml_decisions_get ( qs = TEH_plugin->select_aml_process (TEH_plugin->cls, decision, start, - delta > 0, GNUNET_MIN (MAX_RECORDS, - delta > 0 ? delta : - -delta), + delta > 0 + ? delta + : -delta), + delta > 0, &record_cb, records); switch (qs) |
