- readconfig.c: include sysconfdir to the list of locations

where siproxd will search for its config file
This commit is contained in:
Thomas Ries
2003-11-18 20:00:39 +00:00
parent 61153d735b
commit 2eac7c49b6
4 changed files with 20 additions and 0 deletions
+2
View File
@@ -1,5 +1,7 @@
0.5.0
=====
18-Nov-2003: - readconfig.c: include sysconfdir to the list of locations
where siproxd will search for its config file
14-Nov-2003: - rtpproxy.c: sys/types.h needed for *BSD
- tested: siproxd builds on FreeBSD 4.9
2-Nov-2003: - rtpproxy bugfix: On repetitive INVITES, the UDP media
+3
View File
@@ -166,3 +166,6 @@
/* typedef socklen_t available */
#undef socklen_t
/* will search for config file here */
#undef SIPROXDCONFPATH
+14
View File
@@ -17,6 +17,7 @@ dnl 1-Sep-2003 tries check for IPCHAINS
dnl 5-Sep-2003 tries test for pthreads before libosip stuff
dnl 19-Sep-2003 tries DMALLOC support
dnl 1-Nov-2003 tries check for NETFILTER (IPTABLES)
dnl 18-Nov-2003 tries include sysconfdir to search for config
dnl
dnl
dnl
@@ -281,6 +282,19 @@ AC_CHECK_FUNCS(strncpy strchr strstr sprintf vfprintf vsnprintf)
AC_CHECK_FUNCS(fgets sscanf hstrerror)
dnl
dnl sysconfdir
dnl
SIPROXDCONFPATH=""
tmpset="$sysconfdir"
while test "x$tmpset" != "x$SIPROXDCONFPATH"; do
SIPROXDCONFPATH="$tmpset"
eval tmpset="$tmpset"
done
AC_DEFINE_UNQUOTED(SIPROXDCONFPATH,"$SIPROXDCONFPATH",
[will search for config file here])
AC_SUBST(CPPFLAGS)
AC_SUBST(LIBS)
+1
View File
@@ -60,6 +60,7 @@ int read_config(char *name, int search) {
char tmp[256];
const char *completion[] = {
"%s/.%src", /* this one is special... (idx=0)*/
SIPROXDCONFPATH "/%s.conf",
"/etc/%s.conf",
"/usr/etc/%s.conf",
"/usr/local/etc/%s.conf",