diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-05-17 22:52:27 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-05-17 22:52:27 +0200 |
commit | dc6a6c0ad87a34198a49ea31b39c2eb2bd1e0acb (patch) | |
tree | 6a0c706c619a3ada56b7d8bf4169be9b5af48fca /src/backend | |
parent | de6225f820a6e1627786874d8df9df99b5f5e4bc (diff) | |
download | merchant-dc6a6c0ad87a34198a49ea31b39c2eb2bd1e0acb.tar.gz merchant-dc6a6c0ad87a34198a49ea31b39c2eb2bd1e0acb.tar.bz2 merchant-dc6a6c0ad87a34198a49ea31b39c2eb2bd1e0acb.zip |
misc. fixes
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/taler-merchant-httpd.c | 2 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd.h | 9 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_exchanges.c | 9 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders.c | 3 |
4 files changed, 19 insertions, 4 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index e3640112..b280386b 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -1077,7 +1077,7 @@ url_handler (void *cls, else { infix_strlen = slash - infix_url; - suffix_url = slash; + suffix_url = slash + 1; /* skip the '/' */ suffix_strlen = strlen (suffix_url); } hc->infix = GNUNET_strndup (infix_url, diff --git a/src/backend/taler-merchant-httpd.h b/src/backend/taler-merchant-httpd.h index ceb7dfe2..7e1090d3 100644 --- a/src/backend/taler-merchant-httpd.h +++ b/src/backend/taler-merchant-httpd.h @@ -151,7 +151,11 @@ struct TMH_RequestHandler { /** - * URL prefix the handler is for. + * URL prefix the handler is for, includes the '/', + * so "/orders" or "/products". Does *not* include + * "/private", that is controlled by the array in which + * the handler is defined. Must not contain any + * '/' except for the leading '/'. */ const char *url_prefix; @@ -168,7 +172,8 @@ struct TMH_RequestHandler bool skip_instance; /** - * URL suffix the handler is for. + * URL suffix the handler is for, excludes the '/', + * so "pay" or "claim", not "/pay". */ const char *url_suffix; diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c index ef5bde94..fe4085d0 100644 --- a/src/backend/taler-merchant-httpd_exchanges.c +++ b/src/backend/taler-merchant-httpd_exchanges.c @@ -498,6 +498,7 @@ get_wire_fees (struct Exchange *exchange, for (struct FeesByWireMethod *fbw = exchange->wire_fees_head; NULL != fbw; fbw = fbw->next) + { if (0 == strcasecmp (fbw->wire_method, wire_method) ) { @@ -512,6 +513,10 @@ get_wire_fees (struct Exchange *exchange, } return af; } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Exchange supports `%s' as a wire method (but we do not use that one)\n", + fbw->wire_method); + } return NULL; } @@ -551,6 +556,9 @@ process_find_operations (struct Exchange *exchange) if (NULL == af) { need_wire = GNUNET_YES; + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Exchange does not support `%s' wire method (will retry later)\n", + fo->wire_method); continue; } if (af->start_date.abs_value_us > now.abs_value_us) @@ -688,6 +696,7 @@ handle_wire_data (void *cls, exchange->wire_retry_delay = RETRY_BACKOFF (exchange->wire_retry_delay); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Exchange does not support our wire method. Retrying in %s\n", + GNUNET_STRINGS_relative_time_to_string ( exchange->wire_retry_delay, GNUNET_YES)); diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c index e6af2583..7c6a0c39 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders.c +++ b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -930,12 +930,13 @@ TMH_private_post_orders (const struct TMH_RequestHandler *rh, struct TMH_HandlerContext *hc) { json_t *order; - const char *payment_target; + const char *payment_target = NULL; unsigned int ips_len = 0; struct InventoryProduct *ips = NULL; unsigned int uuids_len = 0; struct GNUNET_Uuid *uuids = NULL; + (void) rh; order = json_object_get (hc->request_body, "order"); if (NULL == order) |