diff options
m--------- | contrib/wallet-core | 0 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd_aml-decisions-get.c | 22 |
2 files changed, 13 insertions, 9 deletions
diff --git a/contrib/wallet-core b/contrib/wallet-core -Subproject 7d23cf257b8dbafa07bda9598894b03f9805d7e +Subproject 621dad2c2ec9a2adc52076cebf65891d6764c80 diff --git a/src/exchange/taler-exchange-httpd_aml-decisions-get.c b/src/exchange/taler-exchange-httpd_aml-decisions-get.c index 0183ac3b8..763817cf6 100644 --- a/src/exchange/taler-exchange-httpd_aml-decisions-get.c +++ b/src/exchange/taler-exchange-httpd_aml-decisions-get.c @@ -81,7 +81,7 @@ TEH_handler_aml_decisions_get ( { enum TALER_AmlDecisionState decision; int delta = -20; - unsigned long long start = INT64_MAX; + unsigned long long start; const char *state_str = args[0]; if (NULL == state_str) @@ -123,40 +123,44 @@ TEH_handler_aml_decisions_get ( p = MHD_lookup_connection_value (rc->connection, MHD_GET_ARGUMENT_KIND, - "start"); + "delta"); if (NULL != p) { char dummy; if (1 != sscanf (p, - "%llu%c", - &start, + "%d%c", + &delta, &dummy)) { GNUNET_break_op (0); return TALER_MHD_reply_with_error (rc->connection, MHD_HTTP_BAD_REQUEST, TALER_EC_GENERIC_PARAMETER_MALFORMED, - "start"); + "delta"); } } + if (delta > 0) + start = 0; + else + start = INT64_MAX; p = MHD_lookup_connection_value (rc->connection, MHD_GET_ARGUMENT_KIND, - "delta"); + "start"); if (NULL != p) { char dummy; if (1 != sscanf (p, - "%d%c", - &delta, + "%llu%c", + &start, &dummy)) { GNUNET_break_op (0); return TALER_MHD_reply_with_error (rc->connection, MHD_HTTP_BAD_REQUEST, TALER_EC_GENERIC_PARAMETER_MALFORMED, - "delta"); + "start"); } } } |