From 6e07995bee1b75c3d7f9e87baf2bb5377fdfee20 Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Tue, 23 Nov 2010 17:00:24 -0500 Subject: [PATCH] freetdm: check alarm status when starting the span --- libs/freetdm/src/ftdm_io.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index 64233a97ac..31a585ecae 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -4585,6 +4585,14 @@ FT_DECLARE(ftdm_status_t) ftdm_configure_span_signaling(ftdm_span_t *span, const FT_DECLARE(ftdm_status_t) ftdm_span_start(ftdm_span_t *span) { if (span->start) { + /* check the alarms again before starting the signaling module + this works-around some I/O modules (netborder I/O module) that cannot + check the alarm status before during configuration because the spans are + not really started yet at the I/O level */ + if (ftdm_set_channels_alarms(span, 0) != FTDM_SUCCESS) { + ftdm_log(FTDM_LOG_ERROR, "%d: Failed to set channel alarms\n", span->span_id); + return FTDM_FAIL; + } return span->start(span); }