[BACK]Return to diag.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libwrap

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libwrap/diag.c between version 1.8.50.1 and 1.8.50.2

version 1.8.50.1, 2012/04/23 16:48:57 version 1.8.50.2, 2012/04/23 23:40:41
Line 23  __RCSID("$NetBSD$");
Line 23  __RCSID("$NetBSD$");
 /* System libraries */  /* System libraries */
   
 #include <syslog.h>  #include <syslog.h>
 #include <stdarg.h>  
 #include <stdio.h>  #include <stdio.h>
 #include <setjmp.h>  #include <setjmp.h>
 #include <string.h>  #include <string.h>
Line 32  __RCSID("$NetBSD$");
Line 31  __RCSID("$NetBSD$");
 /* Local stuff */  /* Local stuff */
   
 #include "tcpd.h"  #include "tcpd.h"
   #include "mystdarg.h"
   
 struct tcpd_context tcpd_context;  struct tcpd_context tcpd_context;
 jmp_buf tcpd_buf;  jmp_buf tcpd_buf;
   
 static void tcpd_diag(int, const char *, const char *, va_list)  static void tcpd_diag __P((int, char *, char *, va_list))
         __attribute__((__format__(__printf__, 3, 0)));          __attribute__((__format__(__printf__, 3, 0)));
   
 /* tcpd_diag - centralize error reporter */  /* tcpd_diag - centralize error reporter */
   
 static void  static void tcpd_diag(severity, tag, format, ap)
 tcpd_diag(int severity, const char *tag, const char *format, va_list ap)  int     severity;
   char   *tag;
   char   *format;
   va_list ap;
 {  {
     char    fmt[BUFSIZ];      char    fmt[BUFSIZ];
     char    buf[BUFSIZ];      char    buf[BUFSIZ];
     size_t  i, o;      int     i, o, oerrno;
     int     oerrno;  
   
     /* save errno in case we need it */      /* save errno in case we need it */
     oerrno = errno;      oerrno = errno;
Line 81  tcpd_diag(int severity, const char *tag,
Line 83  tcpd_diag(int severity, const char *tag,
   
 /* tcpd_warn - report problem of some sort and proceed */  /* tcpd_warn - report problem of some sort and proceed */
   
 void  void    VARARGS(tcpd_warn, char *, format)
 tcpd_warn(const char *format, ...)  
 {  {
     va_list ap;      va_list ap;
   
     va_start(ap, format);      VASTART(ap, char *, format);
     tcpd_diag(LOG_ERR, "warning", format, ap);      tcpd_diag(LOG_ERR, "warning", format, ap);
     va_end(ap);      VAEND(ap);
 }  }
   
 /* tcpd_jump - report serious problem and jump */  /* tcpd_jump - report serious problem and jump */
   
 void  void    VARARGS(tcpd_jump, char *, format)
 tcpd_jump(const char *format, ...)  
 {  {
     va_list ap;      va_list ap;
   
     va_start(ap, format);      VASTART(ap, char *, format);
     tcpd_diag(LOG_ERR, "error", format, ap);      tcpd_diag(LOG_ERR, "error", format, ap);
     va_end(ap);      VAEND(ap);
     longjmp(tcpd_buf, AC_ERROR);      longjmp(tcpd_buf, AC_ERROR);
 }  }

Legend:
Removed from v.1.8.50.1  
changed lines
  Added in v.1.8.50.2

CVSweb <webmaster@jp.NetBSD.org>