summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-08-11 05:25:21 +0200
committerChristian Grothoff <christian@grothoff.org>2018-08-11 05:25:21 +0200
commit6d6b223694303d3b437a2dcee72e4d3542505066 (patch)
tree31865ae859cdd2bd3226bfd9d4e0341b69198e86 /src/exchange/taler-exchange-httpd.c
parent18736c4b91fbd7b24d733e9d457d09615ad35020 (diff)
downloadexchange-6d6b223694303d3b437a2dcee72e4d3542505066.tar.gz
exchange-6d6b223694303d3b437a2dcee72e4d3542505066.tar.bz2
exchange-6d6b223694303d3b437a2dcee72e4d3542505066.zip
cache result from log level check
Diffstat (limited to 'src/exchange/taler-exchange-httpd.c')
-rw-r--r--src/exchange/taler-exchange-httpd.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
index 19c318dbd..286614a5c 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -721,16 +721,33 @@ handle_mhd_logs (void *cls,
const char *fm,
va_list ap)
{
+ static int cache;
char buf[2048];
+ if (-1 == cache)
+ return;
+ if (0 == cache)
+ {
+ if (0 ==
+ GNUNET_get_log_call_status (GNUNET_ERROR_TYPE_INFO,
+ "libmicrohttpd",
+ __FILE__,
+ __FUNCTION__,
+ __LINE__))
+ {
+ cache = -1;
+ return;
+ }
+ }
+ cache = 1;
vsnprintf (buf,
sizeof (buf),
fm,
ap);
- GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
- "libmicrohttpd",
- "%s",
- buf);
+ GNUNET_log_from_nocheck (GNUNET_ERROR_TYPE_INFO,
+ "libmicrohttpd",
+ "%s",
+ buf);
}