Commit 211ac47e authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

use isc_log_wouldlog() to avoid unnecessary formatting work

when the debug level does not warrant logging
parent 720319de
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: socket.c,v 1.147 2000/07/10 19:40:06 explorer Exp $ */
/* $Id: socket.c,v 1.148 2000/07/13 00:25:38 gson Exp $ */
#include <config.h>
......@@ -245,6 +245,9 @@ socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
char peerbuf[256];
va_list ap;
if (! isc_log_wouldlog(isc_lctx, level))
return;
va_start(ap, fmt);
vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
va_end(ap);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment