Detect presence of DSCP in exosip

This commit is contained in:
Guillaume Beraudo 2013-01-08 16:16:59 +01:00
parent d32446b289
commit 5cae5cadeb
2 changed files with 13 additions and 0 deletions

View file

@ -370,6 +370,17 @@ fi
dnl setup flags for exosip library
LP_SETUP_EXOSIP
dnl check exosip support of DSCP in exosip
AC_MSG_CHECKING([for DSCP support in exosip])
AC_TRY_COMPILE([#include <eXosip2/eXosip.h>],
[int dscp=0;eXosip_set_option(EXOSIP_OPT_SET_DSCP,&dscp);],
has_exosip_dscp=yes,has_exosip_dscp=no)
AC_MSG_RESULT($has_exosip_dscp)
if test "$has_exosip_dscp" = "yes" ; then
AC_DEFINE( HAVE_EXOSIP_DSCP, 1, [Define if exosip dscp available] )
fi
if test "$console_ui" = "true" ; then
dnl check gnu readline
LP_CHECK_READLINE

View file

@ -382,8 +382,10 @@ static void set_tls_options(Sal *ctx){
void sal_set_dscp(Sal *ctx, int dscp){
ctx->dscp=dscp;
#ifdef HAVE_EXOSIP_DSCP
if (dscp!=-1)
eXosip_set_option(EXOSIP_OPT_SET_DSCP,&ctx->dscp);
#endif
}
int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int is_secure){