From c22816c39c6fa2585d4bd3c811acbe0b6c1f6e41 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Wed, 23 Feb 2011 16:20:26 -0500 Subject: [PATCH] freetdm: span id specified in raw trace if channel was not mapped --- .../src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.c index 5b16a3404b..e24e64b326 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_trace.c @@ -241,6 +241,11 @@ void sngisdn_trace_raw_q931(sngisdn_span_data_t *signal_data, ftdm_trace_dir_t d sigev.span_id = ftdmchan->physical_span_id; sigev.chan_id = ftdmchan->physical_chan_id; sigev.channel = ftdmchan; + } else { + /* We could not map the channel, but at least set the span */ + if (signal_data->ftdm_span->channels[1]) { + sigev.span_id = signal_data->ftdm_span->channels[1]->physical_span_id; + } } sigev.event_id = FTDM_SIGEVENT_TRACE_RAW;