From 4129713d2ab1898281ec28bc977b36e3a94eb22c Mon Sep 17 00:00:00 2001 From: Thomas Ries Date: Sun, 9 Jan 2011 14:44:23 +0000 Subject: [PATCH] - configure.in: set library/include search paths before searching for local libltdl installation [3086321] --- configure.in | 65 +++++++++++++++++++++++++------------------------- src/dejitter.c | 32 ++++++++++++------------- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/configure.in b/configure.in index 3aebb0c..ab056b0 100644 --- a/configure.in +++ b/configure.in @@ -93,8 +93,39 @@ AM_CONDITIONAL(have_docbook2pdf,test "$docbook2pdf" = "yes") AC_CHECK_PROG(docbook2html,docbook2html,yes,) AM_CONDITIONAL(have_docbook2html,test "$docbook2html" = "yes") + dnl ********************************************** -dnl prepare libtool +dnl * Location of libraries / headerfiles +dnl ********************************************** +dnl +dnl --with-extra-includes +dnl --with-extra-libs +dnl +AC_ARG_WITH(extra-includes, + [ --with-extra-includes=DIR adds non standard include paths], + extra_includes="$withval" ) +AC_SUBST(extra_includes) +AC_MSG_CHECKING("extra includes") +AC_MSG_RESULT($extra_includes) + +AC_ARG_WITH(extra-libs, + [ --with-extra-libs=DIR adds non standard library paths], + extra_libs="$withval" ) +AC_SUBST(extra_libs) +AC_MSG_CHECKING("extra libs") +AC_MSG_RESULT($extra_libs) + +for each in $extra_includes; do + CPPFLAGS="$CPPFLAGS -I$each"; +done + +for each in $extra_libs; do + LIBS="$LIBS -L$each"; +done + + +dnl ********************************************** +dnl prepare libtool (ltdl) dnl ********************************************** dnl dnl We require the ltdl (libtool portable dynamic loader) @@ -138,37 +169,6 @@ fi AC_CONFIG_SUBDIRS(libltdl) -dnl ********************************************** -dnl * Location of libraries / headerfiles -dnl ********************************************** - -dnl -dnl --with-extra-includes -dnl --with-extra-libs -dnl -AC_ARG_WITH(extra-includes, - [ --with-extra-includes=DIR adds non standard include paths], - extra_includes="$withval" ) -AC_SUBST(extra_includes) -AC_MSG_CHECKING("extra includes") -AC_MSG_RESULT($extra_includes) - -AC_ARG_WITH(extra-libs, - [ --with-extra-libs=DIR adds non standard library paths], - extra_libs="$withval" ) -AC_SUBST(extra_libs) -AC_MSG_CHECKING("extra libs") -AC_MSG_RESULT($extra_libs) - -for each in $extra_includes; do - CPPFLAGS="$CPPFLAGS -I$each"; -done - -for each in $extra_libs; do - LIBS="$LIBS -L$each"; -done - - dnl ********************************************** dnl * Building doc dnl ********************************************** @@ -199,7 +199,6 @@ dnl dnl ********************************************** dnl * Selection of static build variants dnl ********************************************** - dnl dnl --enable-static-libosip2 dnl diff --git a/src/dejitter.c b/src/dejitter.c index 414501a..dc493eb 100644 --- a/src/dejitter.c +++ b/src/dejitter.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2006-2008 Hans Carlos Hofmann , + Copyright (C) 2006-2011 Hans Carlos Hofmann , Thomas Ries This file is part of Siproxd. @@ -93,7 +93,7 @@ void dejitter_delayedsendto(int s, const void *msg, size_t len, int flags, const struct timeval *current_tv, rtp_proxytable_t *errret, int nolock) { rtp_delayed_message *m; - rtp_delayed_message **linkin; + rtp_delayed_message *linkin; if (!free_memory) send_top_of_que(nolock); @@ -113,13 +113,13 @@ void dejitter_delayedsendto(int s, const void *msg, size_t len, int flags, msg_que = m; send_top_of_que(nolock); } else { - linkin = &msg_que; - while ((*linkin != NULL) && - (cmp_time_values(&((*linkin)->transm_time),tv) < 0)) { - linkin = (rtp_delayed_message **)&((*linkin)->next); + linkin = msg_que; + while ((linkin != NULL) && + (cmp_time_values(&(linkin->transm_time),tv) < 0)) { + linkin = linkin->next; } - m->next = *linkin; - *linkin = m; + m->next = linkin; + linkin = m; } } @@ -127,19 +127,19 @@ void dejitter_delayedsendto(int s, const void *msg, size_t len, int flags, * Cancel a message */ void dejitter_cancel(rtp_proxytable_t *dropentry) { - rtp_delayed_message **linkout; + rtp_delayed_message *linkout; rtp_delayed_message *m; - linkout = &msg_que; + linkout = msg_que; - while (*linkout != NULL) { - if ((*linkout)->errret == dropentry) { - m = *linkout; - *linkout = m->next; + while (linkout != NULL) { + if (linkout->errret == dropentry) { + m = linkout; + linkout = m->next; m->next = free_memory; free_memory = m; } else { - linkout = (rtp_delayed_message **)&((*linkout)->next); + linkout = linkout->next; } } } @@ -392,7 +392,7 @@ static void send_top_of_que(int nolock) { if ((sts == -1) && (m->errret != NULL) && (errno != ECONNREFUSED)) { osip_call_id_t callid; - ERROR("sendto() [%s:%i size=%i] delayed call failed: %s", + ERROR("sendto() [%s:%i size=%zd] delayed call failed: %s", utils_inet_ntoa(m->errret->remote_ipaddr), m->errret->remote_port, m->message_len, strerror(errno));