commit 3de26db3517b3a019c05f5936a8de8408d7e7ac7
parent 3421048ed589e7230307028f1949937413b343fc
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Sat, 25 Jun 2016 14:40:12 +0200
more diagnostics on picked instance
Diffstat:
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_contract.c b/src/backend/taler-merchant-httpd_contract.c
@@ -231,7 +231,9 @@ MH_handler_contract (struct TMH_RequestHandler *rh,
return TMH_RESPONSE_reply_external_error (connection,
"Unknown receiver given");
}
-
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Signing contract on behalf of receiver '%s'\n",
+ mi->id);
/* add fields to the contract that the backend should provide */
json_object_set (jcontract,
"exchanges",
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c
@@ -918,8 +918,18 @@ MH_handler_pay (struct TMH_RequestHandler *rh,
return (GNUNET_NO == res) ? MHD_YES : MHD_NO;
}
pc->mi = get_instance (root);
- GNUNET_assert (NULL !=
- (pc->mi = get_instance (root)));
+
+ if (NULL == pc->mi)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Not able to find the specified receiver\n");
+ json_decref (root);
+ return TMH_RESPONSE_reply_external_error (connection,
+ "Unknown receiver given");
+ }
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "The receiver for this deposit is '%s'\n",
+ pc->mi->id);
pc->chosen_exchange = GNUNET_strdup (chosen_exchange);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Parsed JSON for /pay.\n");