summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-04-19 00:47:25 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-04-19 00:47:25 +0200
commit6749769a391d60f52246a775aeb1c9be1f17dc34 (patch)
tree72927b08480d6240cde4c1d3e9bf4d4e5c56beb3
parent15c17c49ca280e835c071a45465f4b6ef71f3996 (diff)
downloadmerchant-6749769a391d60f52246a775aeb1c9be1f17dc34.tar.gz
merchant-6749769a391d60f52246a775aeb1c9be1f17dc34.tar.bz2
merchant-6749769a391d60f52246a775aeb1c9be1f17dc34.zip
more excessive logging
-rw-r--r--src/backend/taler-merchant-httpd_exchanges.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c
index 7c24aaad..b1da8a02 100644
--- a/src/backend/taler-merchant-httpd_exchanges.c
+++ b/src/backend/taler-merchant-httpd_exchanges.c
@@ -330,9 +330,16 @@ TMH_EXCHANGES_find_exchange (const char *chosen_exchange,
for (exchange = exchange_head; NULL != exchange; exchange = exchange->next)
/* test it by checking public key --- FIXME: hostname or public key!?
Should probably be URI, not hostname anyway! */
+ {
if (0 == strcmp (exchange->uri,
chosen_exchange))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "The exchange `%s' is already known\n",
+ chosen_exchange);
break;
+ }
+ }
if (NULL == exchange)
{
/* This is a new exchange */
@@ -342,12 +349,32 @@ TMH_EXCHANGES_find_exchange (const char *chosen_exchange,
GNUNET_CONTAINER_DLL_insert (exchange_head,
exchange_tail,
exchange);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "The exchange `%s' is new\n",
+ chosen_exchange);
}
- /* check if we should resume this exchange */
- if ( (GNUNET_SYSERR == exchange->pending) &&
- (0 == GNUNET_TIME_absolute_get_remaining (exchange->retry_time).rel_value_us) )
- exchange->pending = GNUNET_YES;
+ if (GNUNET_SYSERR == exchange->pending)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Maybe retrying previously contacted exchange `%s'\n",
+ chosen_exchange);
+ /* check if we should resume this exchange */
+ if (0 == GNUNET_TIME_absolute_get_remaining (exchange->retry_time).rel_value_us)
+ {
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Retrying exchange `%s'\n",
+ chosen_exchange);
+ exchange->pending = GNUNET_YES;
+ }
+ else
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Not retrying exchange `%s', too early\n",
+ chosen_exchange);
+ }
+ }
fo = GNUNET_new (struct TMH_EXCHANGES_FindOperation);
@@ -362,6 +389,9 @@ TMH_EXCHANGES_find_exchange (const char *chosen_exchange,
{
/* We are not currently waiting for a reply, immediately
return result */
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Exchange `%s' already contacted\n",
+ chosen_exchange);
fo->at = GNUNET_SCHEDULER_add_now (&return_result,
fo);
return fo;