コード例 #1
0
ファイル: memcache.c プロジェクト: laoflch/proftpd
static void memcache_tpl_fatal(char *fmt, ...) {
  va_list ap;

  va_start(ap, fmt);
  pr_trace_vmsg(trace_channel, 1, fmt, ap);
  va_end(ap);

  _exit(1);
}
コード例 #2
0
ファイル: trace.c プロジェクト: dbarba74/proftpd
int pr_trace_msg(const char *channel, int level, const char *fmt, ...) {
  int res;
  va_list msg;

  va_start(msg, fmt);
  res = pr_trace_vmsg(channel, level, fmt, msg);
  va_end(msg);

  return res;
}
コード例 #3
0
ファイル: memcache.c プロジェクト: laoflch/proftpd
static int memcache_tpl_oops(const char *fmt, ...) {
  va_list ap;

  va_start(ap, fmt);
  pr_trace_vmsg(trace_channel, 1, fmt, ap);
  va_end(ap);

  /* XXX Does tpl check the return value of its oops() hook? */
  return 0;
}
コード例 #4
0
ファイル: trace.c プロジェクト: SangramSahuFIS/proftpd
int pr_trace_msg(const char *channel, int level, const char *fmt, ...) {
  int res;
  va_list msg;

  if (channel == NULL ||
      fmt == NULL ||
      level <= 0) {
    errno = EINVAL;
    return -1;
  }

  /* If no one's listening... */
  if (pr_log_event_listening(PR_LOG_TYPE_TRACELOG) <= 0 &&
      trace_logfd < 0) {
    return 0;
  }

  va_start(msg, fmt);
  res = pr_trace_vmsg(channel, level, fmt, msg);
  va_end(msg);

  return res;
}