From 8cc82490529b9729c47fa4784384be7ee496593e Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Mon, 28 Feb 2011 18:53:02 -0500 Subject: [PATCH 1/2] freetdm: Do not call sng_isdn_retrieve_facility_caller_name when transparent facility is enabled --- .../ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 cfc5017a8d..9cac9d05b1 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 @@ -162,7 +162,10 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event) #if 1 /* this section will not be needed once asn decoding function with key-value pairs is implemented */ - if (signal_data->facility == SNGISDN_OPT_TRUE && conEvnt->facilityStr.eh.pres) { + if (signal_data->facility == SNGISDN_OPT_TRUE && + signal_data->facility_ie_decode != SNGISDN_OPT_FALSE && + conEvnt->facilityStr.eh.pres) { + /* Verify whether the Caller Name will come in a subsequent FACILITY message */ uint16_t ret_val; char retrieved_str[255]; @@ -832,7 +835,7 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event) If there will be no information following, but current FACILITY IE contains a caller name, returns 0 If there will be information following, returns 1 */ - + if (sng_isdn_retrieve_facility_caller_name(&facEvnt->facElmt.facStr.val[2], facEvnt->facElmt.facStr.len, retrieved_str) == 0) { strcpy(ftdmchan->caller_data.cid_name, retrieved_str); } else { From 086664fbd24d43bd37baff98f1656e7085bef352 Mon Sep 17 00:00:00 2001 From: David Yat Sin Date: Tue, 1 Mar 2011 09:54:52 -0500 Subject: [PATCH 2/2] freetdm: Typo in function define --- libs/freetdm/src/ftdm_io.c | 2 +- libs/freetdm/src/include/private/ftdm_core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index ce345b2e28..ade6a7525f 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -4047,7 +4047,7 @@ done: return status; } -FT_DECLARE(ftdm_iterator_t) *ftdm_get_iterator(ftdm_iterator_type_t type, ftdm_iterator_t *iter) +FT_DECLARE(ftdm_iterator_t *) ftdm_get_iterator(ftdm_iterator_type_t type, ftdm_iterator_t *iter) { int allocated = 0; if (iter) { diff --git a/libs/freetdm/src/include/private/ftdm_core.h b/libs/freetdm/src/include/private/ftdm_core.h index cd66afe9db..c2de07b3f1 100644 --- a/libs/freetdm/src/include/private/ftdm_core.h +++ b/libs/freetdm/src/include/private/ftdm_core.h @@ -589,7 +589,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_open_chan(ftdm_channel_t *ftdmchan); FT_DECLARE(void) ftdm_ack_indication(ftdm_channel_t *ftdmchan, ftdm_channel_indication_t indication, ftdm_status_t status); -FT_DECLARE(ftdm_iterator_t) *ftdm_get_iterator(ftdm_iterator_type_t type, ftdm_iterator_t *iter); +FT_DECLARE(ftdm_iterator_t *) ftdm_get_iterator(ftdm_iterator_type_t type, ftdm_iterator_t *iter); /*!