Changeset View
Changeset View
Standalone View
Standalone View
contrib/tcp_wrappers/diag.c
Show All 23 Lines | |||||
#include "tcpd.h" | #include "tcpd.h" | ||||
#include "mystdarg.h" | #include "mystdarg.h" | ||||
struct tcpd_context tcpd_context; | struct tcpd_context tcpd_context; | ||||
jmp_buf tcpd_buf; | jmp_buf tcpd_buf; | ||||
/* tcpd_diag - centralize error reporter */ | /* tcpd_diag - centralize error reporter */ | ||||
static void tcpd_diag(severity, tag, format, ap) | static void tcpd_diag(int severity, char *tag, char *format, va_list ap) | ||||
int severity; | |||||
char *tag; | |||||
char *format; | |||||
va_list ap; | |||||
{ | { | ||||
char fmt[BUFSIZ]; | char fmt[BUFSIZ]; | ||||
if (tcpd_context.file) | if (tcpd_context.file) | ||||
sprintf(fmt, "%s: %s, line %d: %s", | sprintf(fmt, "%s: %s, line %d: %s", | ||||
tag, tcpd_context.file, tcpd_context.line, format); | tag, tcpd_context.file, tcpd_context.line, format); | ||||
else | else | ||||
sprintf(fmt, "%s: %s", tag, format); | sprintf(fmt, "%s: %s", tag, format); | ||||
Show All 25 Lines |