cache result from log level check
This commit is contained in:
parent
18736c4b91
commit
6d6b223694
@ -721,13 +721,30 @@ 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,
|
||||
GNUNET_log_from_nocheck (GNUNET_ERROR_TYPE_INFO,
|
||||
"libmicrohttpd",
|
||||
"%s",
|
||||
buf);
|
||||
|
Loading…
Reference in New Issue
Block a user