diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-09-21 15:39:59 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-09-21 15:39:59 +0200 |
commit | 49739455b0c522a9257966dcad92a76081450009 (patch) | |
tree | 8bad74ec4a4602923bf658beee88fdaea1bdf078 /src/mint/taler-mint-httpd.c | |
parent | cf0249b4438b8859c97e5c499db1de5615e7e6ae (diff) | |
download | exchange-49739455b0c522a9257966dcad92a76081450009.tar.xz |
fix NPE if denomination key not found
Diffstat (limited to 'src/mint/taler-mint-httpd.c')
-rw-r--r-- | src/mint/taler-mint-httpd.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mint/taler-mint-httpd.c b/src/mint/taler-mint-httpd.c index 55ecd58d2..328fa0357 100644 --- a/src/mint/taler-mint-httpd.c +++ b/src/mint/taler-mint-httpd.c @@ -610,6 +610,31 @@ connection_done (void *cls, /** + * Function called for logging by MHD. + * + * @param cls closure, NULL + * @param fm format string (`printf()`-style) + * @param ap arguments to @a fm + */ +static void +handle_mhd_logs (void *cls, + const char *fm, + va_list ap) +{ + char buf[2048]; + + vsnprintf (buf, + sizeof (buf), + fm, + ap); + GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, + "libmicrohttpd", + "%s", + buf); +} + + +/** * The main function of the taler-mint-httpd server ("the mint"). * * @param argc number of arguments from the command line @@ -665,6 +690,7 @@ main (int argc, serve_port, NULL, NULL, &handle_mhd_request, NULL, + MHD_OPTION_EXTERNAL_LOGGER, &handle_mhd_logs, NULL, MHD_OPTION_NOTIFY_COMPLETED, &handle_mhd_completion_callback, NULL, MHD_OPTION_CONNECTION_TIMEOUT, connection_timeout, #if HAVE_DEVELOPER |