diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index 011ff4b0f4..cde3c245cf 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -163,7 +163,7 @@ static ftdm_status_t start_chan_io_dump(ftdm_channel_t *chan, ftdm_io_dump_t *du return FTDM_FAIL; } memset(dump, 0, sizeof(*dump)); - dump->buffer = ftdm_malloc(size); + dump->buffer = ftdm_malloc((uint32_t)size); if (!dump->buffer) { return FTDM_FAIL; } @@ -2814,7 +2814,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_command(ftdm_channel_t *ftdmchan, ftdm_co GOTO_STATUS(done, FTDM_FAIL); } dump_chan_io_to_file(ftdmchan, &ftdmchan->rxdump, obj); - ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Dumped input of size %zd to file %p\n", ftdmchan->rxdump.size, obj); + ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Dumped input of size %d to file %p\n", ftdmchan->rxdump.size, obj); GOTO_STATUS(done, FTDM_SUCCESS); } break; 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 16b22a5da1..086354a993 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 @@ -328,8 +328,6 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event) sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info; ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan; - sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) ftdmchan->span->signal_data; - CnStEvnt *cnStEvnt = &sngisdn_event->event.cnStEvnt; ISDN_FUNC_TRACE_ENTER(__FUNCTION__); diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c index 1a7814a75b..38bbdb6968 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_out.c @@ -526,7 +526,8 @@ void sngisdn_snd_disconnect(ftdm_channel_t *ftdmchan) memset(&discEvnt, 0, sizeof(discEvnt)); - /* Fill discEvnt here */ + /* Fill discEvnt here */ + /* TODO move this to set_cause_ie function */ discEvnt.causeDgn[0].eh.pres = PRSNT_NODEF; discEvnt.causeDgn[0].location.pres = PRSNT_NODEF; discEvnt.causeDgn[0].location.val = IN_LOC_PRIVNETLU; @@ -563,7 +564,7 @@ void sngisdn_snd_release(ftdm_channel_t *ftdmchan, uint8_t glare) memset(&relEvnt, 0, sizeof(relEvnt)); - /* Fill discEvnt here */ + /* Fill relEvnt here */ relEvnt.causeDgn[0].eh.pres = PRSNT_NODEF; relEvnt.causeDgn[0].location.pres = PRSNT_NODEF; relEvnt.causeDgn[0].location.val = IN_LOC_PRIVNETLU; diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c index 37d2938353..fae25c9ad6 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c @@ -576,9 +576,8 @@ ftdm_status_t set_facility_ie(ftdm_channel_t *ftdmchan, FacilityStr *facilityStr ftdm_status_t set_facility_ie_str(ftdm_channel_t *ftdmchan, uint8_t *data, ftdm_size_t *data_len) { ftdm_caller_data_t *caller_data = &ftdmchan->caller_data; - - if (caller_data->raw_data_len > 0 && caller_data->raw_data[0] == SNGISDN_Q931_FACILITY_IE_ID) { + if (caller_data->raw_data_len > 0 && caller_data->raw_data[0] == SNGISDN_Q931_FACILITY_IE_ID) { *data_len = caller_data->raw_data[1]; memcpy(data, &caller_data->raw_data[2], *data_len); return FTDM_SUCCESS; diff --git a/libs/freetdm/src/testsangomaboost.c b/libs/freetdm/src/testsangomaboost.c index 85b5332635..84ff287830 100644 --- a/libs/freetdm/src/testsangomaboost.c +++ b/libs/freetdm/src/testsangomaboost.c @@ -49,7 +49,9 @@ #include #include #ifdef __linux__ +#ifndef __USE_BSD #define __USE_BSD +#endif #include #endif #include "freetdm.h"