diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index 4c75b6bd8a..12397c0666 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -6053,9 +6053,12 @@ FT_DECLARE(ftdm_status_t) ftdm_sigmsg_get_raw_data_detached(ftdm_sigmsg_t *sigms if (!sigmsg || !sigmsg->raw.len) { return FTDM_FAIL; } - + *data = sigmsg->raw.data; - *datalen = sigmsg->raw.len; + *datalen = sigmsg->raw.len; + + sigmsg->raw.data = NULL; + sigmsg->raw.len = 0; return FTDM_SUCCESS; } diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c index 9cac9d05b1..33f3d9870b 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c @@ -808,17 +808,10 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event) if (signal_data->facility_ie_decode == SNGISDN_OPT_FALSE) { /* If Facility decoding is disabled, we do not care about current call state, just pass event up to user */ - ftdm_sigmsg_t sigev; if (facEvnt->facElmt.facStr.pres) { get_facility_ie_str(ftdmchan, &facEvnt->facElmt.facStr.val[2], facEvnt->facElmt.facStr.len-2); + sngisdn_send_signal(sngisdn_info, FTDM_SIGEVENT_FACILITY); } - memset(&sigev, 0, sizeof(sigev)); - sigev.chan_id = ftdmchan->chan_id; - sigev.span_id = ftdmchan->span_id; - sigev.channel = ftdmchan; - - sigev.event_id = FTDM_SIGEVENT_FACILITY; - ftdm_span_send_signal(ftdmchan->span, &sigev); ISDN_FUNC_TRACE_EXIT(__FUNCTION__); return; }