From: Stefan Knoblich Date: Tue, 9 Nov 2010 14:51:30 +0000 (+0100) Subject: ftmod_libpri: Bail out with an error message if libpri is too old and selected trunk... X-Git-Tag: v1.2-rc1~265^2~11^2~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff7a617098756610f3e5564d04affc8d48b4652f;p=thirdparty%2Ffreeswitch.git ftmod_libpri: Bail out with an error message if libpri is too old and selected trunk type is BRI or BRI_PTMP Signed-off-by: Stefan Knoblich --- diff --git a/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c b/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c index b714b3569a..af5ab5f515 100644 --- a/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c +++ b/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c @@ -1606,9 +1606,14 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_libpri_configure_span) memset(isdn_data, 0, sizeof(*isdn_data)); switch (ftdm_span_get_trunk_type(span)) { - case FTDM_TRUNK_E1: case FTDM_TRUNK_BRI: case FTDM_TRUNK_BRI_PTMP: +#ifndef HAVE_LIBPRI_BRI + ftdm_log(FTDM_LOG_ERROR, "Unsupported trunk type: '%s', libpri too old\n", ftdm_trunk_type2str(ftdm_span_get_trunk_type(span))); + snprintf(span->last_error, sizeof(span->last_error), "Unsupported trunk type [%s], libpri too old", ftdm_trunk_type2str(ftdm_span_get_trunk_type(span))); + return FTDM_FAIL; +#endif + case FTDM_TRUNK_E1: ftdm_log(FTDM_LOG_NOTICE, "Setting default Layer 1 to ALAW since this is an E1/BRI/BRI PTMP trunk\n"); isdn_data->l1 = PRI_LAYER_1_ALAW; break;