- readconfig.c: include sysconfdir to the list of locations
where siproxd will search for its config file
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -166,3 +166,6 @@
|
||||
/* typedef socklen_t available */
|
||||
#undef socklen_t
|
||||
|
||||
/* will search for config file here */
|
||||
#undef SIPROXDCONFPATH
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user