From 23aa931d439441d0f65cb713ea6887e5046d2dac Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Wed, 5 May 2010 13:16:37 -0400 Subject: [PATCH] freetdm: remove SCTP requirement, now is optional --- libs/freetdm/Makefile.am | 4 +--- .../src/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/freetdm/Makefile.am b/libs/freetdm/Makefile.am index 7016993435..c63cefc7ec 100644 --- a/libs/freetdm/Makefile.am +++ b/libs/freetdm/Makefile.am @@ -37,9 +37,7 @@ libdir = @libdir@ library_includedir = $(PREFIX)/include INCS = -I$(FT_SRCDIR)/$(SRC)/include -I$(FT_SRCDIR)/$(SRC)/isdn/include -I$(FT_SRCDIR)/$(SRC)/include/private -if HAVE_SCTP -INCS += -I$(FT_SRCDIR)/$(SRC)/ftmod/ftmod_sangoma_boost -endif +INCS += -I$(FT_SRCDIR)/$(SRC)/ftmod/ftmod_sangoma_boost MY_CFLAGS = $(INCS) $(FTDM_CFLAGS) -DFTDM_CONFIG_DIR=\"@confdir@\" -DFTDM_MOD_DIR=\"$(moddir)\" @COMP_VENDOR_CFLAGS@ @DEFS@ COMPILE = $(CC) $(MY_CFLAGS) $(INCS) LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE) diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c b/libs/freetdm/src/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c index 2f5e88c18f..9b530d56e3 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c @@ -2515,6 +2515,11 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_sangoma_boost_configure_span) } if (!sigmod) { +#ifndef HAVE_NETINET_SCTP_H + ftdm_log(FTDM_LOG_CRIT, "No sigmod attribute in span %s, you must either specify a sigmod or re-compile with SCTP available to use socket mode boost!\n"); + ftdm_set_string(span->last_error, "No sigmod configuration was set and there is no SCTP available!"); + FAIL_CONFIG_RETURN(FTDM_FAIL); +#endif if (!local_ip && local_port && remote_ip && remote_port && sig_cb) { ftdm_set_string(span->last_error, "missing Sangoma boost IP parameters"); FAIL_CONFIG_RETURN(FTDM_FAIL);