diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-12-15 18:16:33 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-12-15 18:16:33 +0100 |
commit | 36e15a501fc8285f75a0e403d4d64e46f77c732d (patch) | |
tree | 2d5d81b3bff1c9cbe1cad4aaa24e61932eda169b /src/bank-lib/fakebank.c | |
parent | 745a48ef7c01170c2b37bfe7849f9704f8ecc274 (diff) |
purge history-range API, no longer needed (#5993)
Diffstat (limited to 'src/bank-lib/fakebank.c')
-rw-r--r-- | src/bank-lib/fakebank.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c index e1a5c9bbb..5b388f668 100644 --- a/src/bank-lib/fakebank.c +++ b/src/bank-lib/fakebank.c @@ -715,74 +715,6 @@ handle_history (struct TALER_FAKEBANK_Handle *h, /** - * Handle incoming HTTP request for /history-range. - * - * @param h the fakebank handle - * @param connection the connection - * @param con_cls place to store state, not used - * @return MHD result code - */ -static int -handle_history_range (struct TALER_FAKEBANK_Handle *h, - struct MHD_Connection *connection, - void **con_cls) -{ - struct HistoryArgs ha; - struct HistoryRangeDates hrd; - const char *start; - const char *end; - long long unsigned int start_stamp; - long long unsigned int end_stamp; - struct Transaction *pos; - - (void) con_cls; - if (GNUNET_OK != - TFH_parse_history_common_args (connection, - &ha)) - { - GNUNET_break (0); - return MHD_NO; - } - start = MHD_lookup_connection_value (connection, - MHD_GET_ARGUMENT_KIND, - "start"); - end = MHD_lookup_connection_value (connection, - MHD_GET_ARGUMENT_KIND, - "end"); - - if ( (NULL == start) || (1 != sscanf (start, - "%llu", - &start_stamp)) || - (NULL == end) || (1 != sscanf (end, - "%lld", - &end_stamp)) ) - { - GNUNET_break (0); - return MHD_NO; - } - - hrd.start.abs_value_us = start_stamp * 1000LL * 1000LL; - hrd.end.abs_value_us = end_stamp * 1000LL * 1000LL; - ha.range = &hrd; - - /* hunt for 'pos' in the Transaction(s) LL. */ - for (pos = h->transactions_head; - NULL != pos; - pos = pos->next) - { - if (hrd.start.abs_value_us <= pos->date.abs_value_us) - break; - } - return TFH_build_history_response (connection, - pos, - &ha, - &TFH_handle_history_range_skip, - &TFH_handle_history_range_skip, - &TFH_handle_history_range_advance); -} - - -/** * Handle incoming HTTP request. * * @param cls a `struct TALER_FAKEBANK_Handle` @@ -837,13 +769,6 @@ handle_mhd_request (void *cls, upload_data_size, con_cls); if ( (0 == strcasecmp (url, - "/history-range")) && - (0 == strcasecmp (method, - MHD_HTTP_METHOD_GET)) ) - return handle_history_range (h, - connection, - con_cls); - if ( (0 == strcasecmp (url, "/history")) && (0 == strcasecmp (method, MHD_HTTP_METHOD_GET)) ) |