From 8edac3c2b79cfba616a0afeb956bd2f102dd766e Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Sun, 2 Jan 2005 11:43:38 +0000 Subject: [PATCH] - removed dprintf forn configure.in - added "uname -a" string to startup/accept debug copnnection --- config.h.in | 6 ------ configure.in | 2 +- src/Makefile.am | 4 +++- src/log.c | 1 + src/log.h | 1 + src/siproxd.c | 5 ++++- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/config.h.in b/config.h.in index ca16b71..5bc7ce6 100644 --- a/config.h.in +++ b/config.h.in @@ -15,9 +15,6 @@ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT -/* Define to 1 if you have the `dprintf' function. */ -#undef HAVE_DPRINTF - /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H @@ -180,9 +177,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_VARARGS_H -/* Define to 1 if you have the `vdprintf' function. */ -#undef HAVE_VDPRINTF - /* Define to 1 if you have the `vfprintf' function. */ #undef HAVE_VFPRINTF diff --git a/configure.in b/configure.in index 3ca4574..46ff04a 100644 --- a/configure.in +++ b/configure.in @@ -366,7 +366,7 @@ AC_CHECK_FUNCS(getopt_long setsid syslog) AC_CHECK_FUNCS(getuid setuid getgid setgid getpwnam chroot) AC_CHECK_FUNCS(socket bind select read send sendto fcntl) AC_CHECK_FUNCS(strncpy strchr strstr sprintf vfprintf vsnprintf) -AC_CHECK_FUNCS(dprintf vdprintf listen accept) +AC_CHECK_FUNCS(listen accept) AC_CHECK_FUNCS(fgets sscanf) AC_CHECK_FUNCS(hstrerror,,AC_CHECK_LIB(resolv,hstrerror,[ AC_DEFINE_UNQUOTED(HAVE_HSTRERROR) diff --git a/src/Makefile.am b/src/Makefile.am index 4005ce3..d6c4d15 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,7 +19,9 @@ # -AM_CFLAGS = -Wall -DBUILDSTR=\"`cat .buildno`\" -D_GNU_SOURCE +AM_CFLAGS = -Wall -D_GNU_SOURCE \ + -DBUILDSTR="\"`cat .buildno`\"" \ + -DUNAME="\"`uname -a`\"" # # Siproxd itself diff --git a/src/log.c b/src/log.c index b119b42..299eb20 100644 --- a/src/log.c +++ b/src/log.c @@ -176,6 +176,7 @@ void log_tcp_connect(void) { } else { debug_fd=accept(debug_listen_fd, NULL, NULL); INFO("Accepted DEBUG TCP connection [fd=%i]", debug_fd); + DEBUGC(DBCLASS_ALL,UNAME); } } diff --git a/src/log.h b/src/log.h index a3f39ea..b6cb071 100644 --- a/src/log.h +++ b/src/log.h @@ -34,6 +34,7 @@ #define DBCLASS_RTP 0x00000200 /* RTP proxy */ #define DBCLASS_ACCESS 0x00000400 /* Access list evaluation */ #define DBCLASS_AUTH 0x00000800 /* Authentication */ +#define DBCLASS_ALL 0xffffffff /* All classes */ void log_set_pattern(int pattern); diff --git a/src/siproxd.c b/src/siproxd.c index d01d6ba..aefb9d2 100644 --- a/src/siproxd.c +++ b/src/siproxd.c @@ -178,7 +178,8 @@ int main (int argc, char *argv[]) /* * Init stuff */ - INFO(PACKAGE"-"VERSION"-"BUILDSTR" started"); + INFO(PACKAGE"-"VERSION"-"BUILDSTR" starting up"); + DEBUGC(DBCLASS_ALL,UNAME); /* read the config file */ if (read_config(configfile, config_search) == STS_FAILURE) exit(1); @@ -251,6 +252,8 @@ int main (int argc, char *argv[]) */ log_set_silence(configuration.silence_log); + INFO(PACKAGE"-"VERSION"-"BUILDSTR" started"); + DEBUGC(DBCLASS_ALL,UNAME); /* * Main loop */