Beispiel #1
0
void
slog(const ilogfile dest, const unsigned int snomask, const char *const fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	vslog(dest, snomask, fmt, ap);
	va_end(ap);
}
Beispiel #2
0
void slog(int level, const char *str, ...)
{
    va_list ap;

    va_start(ap, str);
    vslog(level, str, ap);
    va_end(ap);
}
Beispiel #3
0
void slog_debug(const char *format, ...)
{
    /* This function disappears from code when compiled without debug flag */
#ifdef DEBUG
    va_list ap;
    va_start(ap, format);

    vslog(LOG_DEBUG, format, ap);
    va_end(ap);
#endif
}
Beispiel #4
0
void
swarnx(const char *fmt, ...)
{

   if (fmt != NULL) {
      va_list ap, apcopy;

      /* LINTED pointer casts may be troublesome */
      va_start(ap, fmt);
      va_start(apcopy, fmt);

      vslog(LOG_WARNING, fmt, ap, apcopy);

      /* LINTED expression has null effect */
      va_end(apcopy);
      va_end(ap);
   }
}
Beispiel #5
0
void
serrx(const char *fmt, ...)
{

   if (fmt != NULL) {
      va_list ap, apcopy;

      va_start(ap, fmt);
      va_start(apcopy, fmt);

      vslog(LOG_ERR, fmt, ap, apcopy);

      /* LINTED expression has null effect */
      va_end(apcopy);
      va_end(ap);
   }

#if SOCKS_CLIENT
   exit(EXIT_FAILURE);
#else
   sockdexit(EXIT_FAILURE);
#endif /* SOCKS_CLIENT */
}