From fee4f5507b31e76040533489c7ed4b52352deb66 Mon Sep 17 00:00:00 2001 From: Arnaldo M Pereira Date: Wed, 13 Oct 2010 17:15:21 -0300 Subject: [PATCH] freetdm: fixes to build on win32 --- .../ftmod_sangoma_isdn/ftmod_sangoma_isdn.h | 4 ++ .../ftmod_sangoma_isdn_stack_cntrl.c | 4 +- .../ftmod_sangoma_isdn_stack_hndl.c | 58 +++++++++++-------- .../ftmod_sangoma_isdn_stack_rcv.c | 51 ++++++++++------ 4 files changed, 75 insertions(+), 42 deletions(-) diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h index bc928354a7..d575fcdd22 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h @@ -38,8 +38,12 @@ #include #include #include +#ifdef HAVE_STDINT_H #include +#endif +#ifdef HAVE_UNISTD_H #include +#endif #include #include "private/ftdm_core.h" diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cntrl.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cntrl.c index cea8ac0173..27c16c2a51 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cntrl.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cntrl.c @@ -158,7 +158,7 @@ ftdm_status_t sng_isdn_deactivate_phy(ftdm_span_t *span) ftdm_status_t sng_isdn_activate_cc(ftdm_span_t *span) { - CcMngmt cntrl;; + CcMngmt cntrl; Pst pst; sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*)span->signal_data; @@ -239,7 +239,7 @@ ftdm_status_t sng_isdn_activate_trace(ftdm_span_t *span, sngisdn_tracetype_t tra ftdm_status_t sng_isdn_cntrl_q931(ftdm_span_t *span, uint8_t action, uint8_t subaction) { - InMngmt cntrl;; + InMngmt cntrl; Pst pst; sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*)span->signal_data; 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 827647f1f6..cb32730c5c 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 @@ -42,7 +42,6 @@ extern ftdm_status_t cpy_calling_name_from_stack(ftdm_caller_data_t *ftdm, Displ /* Remote side transmit a SETUP */ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); unsigned i; int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; @@ -54,6 +53,8 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event) sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) ftdmchan->span->signal_data; ConEvnt *conEvnt = &sngisdn_event->event.conEvnt; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_assert(!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_STATE_CHANGE), "State change flag pending\n"); ftdm_log_chan(sngisdn_info->ftdmchan, FTDM_LOG_DEBUG, "Processing SETUP (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId); @@ -241,8 +242,6 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event) /* Remote side transmit a CONNECT or CONNECT ACK */ void sngisdn_process_con_cfm (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); - int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -250,6 +249,8 @@ void sngisdn_process_con_cfm (sngisdn_event_data_t *sngisdn_event) sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info; ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from conStEvnt struct for now */ /* CnStEvnt *cnStEvnt = &sngisdn_event->event.cnStEvnt; */ @@ -313,8 +314,6 @@ void sngisdn_process_con_cfm (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); - int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -328,6 +327,8 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event) CnStEvnt *cnStEvnt = &sngisdn_event->event.cnStEvnt; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_assert(!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_STATE_CHANGE), "State change flag pending\n"); ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing %s (suId:%u suInstId:%u spInstId:%u ces:%d)\n", @@ -445,8 +446,6 @@ sngisdn_process_cnst_ind_end: void sngisdn_process_disc_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); - int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -455,6 +454,8 @@ void sngisdn_process_disc_ind (sngisdn_event_data_t *sngisdn_event) DiscEvnt *discEvnt = &sngisdn_event->event.discEvnt; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing DISCONNECT (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId); ftdm_assert(!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_STATE_CHANGE), "State change flag pending\n"); @@ -502,7 +503,6 @@ void sngisdn_process_disc_ind (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -511,6 +511,8 @@ void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event) RelEvnt *relEvnt = &sngisdn_event->event.relEvnt; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing RELEASE/RELEASE COMPLETE (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId); ftdm_assert(!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_STATE_CHANGE), "State change flag pending\n"); @@ -597,7 +599,6 @@ void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_dat_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -605,6 +606,8 @@ void sngisdn_process_dat_ind (sngisdn_event_data_t *sngisdn_event) sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info; ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from infoEvnt struct for now */ /* InfoEvnt *infoEvnt = &sngisdn_event->event.infoEvnt; */ @@ -615,7 +618,6 @@ void sngisdn_process_dat_ind (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_sshl_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -623,6 +625,8 @@ void sngisdn_process_sshl_ind (sngisdn_event_data_t *sngisdn_event) sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info; ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /* SsHlEvnt *ssHlEvnt = &sngisdn_event->event.ssHlEvnt; */ @@ -633,14 +637,15 @@ void sngisdn_process_sshl_ind (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_sshl_cfm (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; - + sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info; ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /* SsHlEvnt *ssHlEvnt = &sngisdn_event->event.ssHlEvnt; */ @@ -651,7 +656,6 @@ void sngisdn_process_sshl_cfm (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_rmrt_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -659,6 +663,8 @@ void sngisdn_process_rmrt_ind (sngisdn_event_data_t *sngisdn_event) sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info; ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /* RmRtEvnt *rmRtEvnt = &sngisdn_event->event.rmRtEvnt; */ @@ -669,7 +675,6 @@ void sngisdn_process_rmrt_ind (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_rmrt_cfm (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -677,6 +682,8 @@ void sngisdn_process_rmrt_cfm (sngisdn_event_data_t *sngisdn_event) sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info; ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /* RmRtEvnt *rmRtEvnt = &sngisdn_event->event.rmRtEvnt; */ @@ -687,7 +694,6 @@ void sngisdn_process_rmrt_cfm (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_flc_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -695,6 +701,8 @@ void sngisdn_process_flc_ind (sngisdn_event_data_t *sngisdn_event) sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info; ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /* StaEvnt *staEvnt = &sngisdn_event->event.staEvnt; */ @@ -705,8 +713,6 @@ void sngisdn_process_flc_ind (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); - int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -717,6 +723,8 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event) FacEvnt *facEvnt = &sngisdn_event->event.facEvnt; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing FACILITY IND (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId); switch (ftdmchan->state) { @@ -758,8 +766,6 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); - int16_t suId = sngisdn_event->suId; uint32_t suInstId = sngisdn_event->suInstId; uint32_t spInstId = sngisdn_event->spInstId; @@ -770,6 +776,8 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event) uint8_t call_state = 0; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + if (staEvnt->callSte.eh.pres && staEvnt->callSte.callGlblSte.pres) { call_state = staEvnt->callSte.callGlblSte.val; } @@ -983,11 +991,12 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_srv_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; int16_t dChan = sngisdn_event->dChan; uint8_t ces = sngisdn_event->ces; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /*Srv *srvEvnt = &sngisdn_event->event.srvEvnt;*/ @@ -998,11 +1007,12 @@ void sngisdn_process_srv_ind (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_srv_cfm (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; int16_t dChan = sngisdn_event->dChan; uint8_t ces = sngisdn_event->ces; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /*Srv *srvEvnt = &sngisdn_event->event.srvEvnt;*/ @@ -1013,12 +1023,13 @@ void sngisdn_process_srv_cfm (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_rst_cfm (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; int16_t dChan = sngisdn_event->dChan; uint8_t ces = sngisdn_event->ces; uint8_t evntType = sngisdn_event->evntType; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /*Rst *rstEvnt = &sngisdn_event->event.rstEvnt;*/ @@ -1030,12 +1041,13 @@ void sngisdn_process_rst_cfm (sngisdn_event_data_t *sngisdn_event) void sngisdn_process_rst_ind (sngisdn_event_data_t *sngisdn_event) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); int16_t suId = sngisdn_event->suId; int16_t dChan = sngisdn_event->dChan; uint8_t ces = sngisdn_event->ces; uint8_t evntType = sngisdn_event->evntType; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + /* Function does not require any info from ssHlEvnt struct for now */ /*Rst *rstEvnt = &sngisdn_event->event.rstEvnt;*/ diff --git a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_rcv.c b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_rcv.c index 9bf60537fe..5580f3a950 100644 --- a/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_rcv.c +++ b/libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_rcv.c @@ -43,11 +43,12 @@ extern void get_memory_info(void); void sngisdn_rcv_con_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, ConEvnt *conEvnt, int16_t dChan, uint8_t ces) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); uint8_t bchan_no = 0; sngisdn_chan_data_t *sngisdn_info = NULL; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_assert(g_sngisdn_data.ccs[suId].activation_done != 0, "Con Ind on unconfigured cc\n"); ftdm_assert(g_sngisdn_data.dchans[dChan].num_spans != 0, "Con Ind on unconfigured dchan\n"); @@ -103,10 +104,11 @@ void sngisdn_rcv_con_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Co void sngisdn_rcv_con_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, CnStEvnt *cnStEvnt, int16_t dChan, uint8_t ces) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info = NULL; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_assert(g_sngisdn_data.ccs[suId].activation_done != 0, "Con Cfm on unconfigured cc\n"); ftdm_assert(g_sngisdn_data.dchans[dChan].num_spans != 0, "Con Cfm on unconfigured dchan\n"); @@ -146,10 +148,11 @@ void sngisdn_rcv_con_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, Cn void sngisdn_rcv_cnst_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, CnStEvnt *cnStEvnt, uint8_t evntType, int16_t dChan, uint8_t ces) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info = NULL; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_assert(g_sngisdn_data.ccs[suId].activation_done != 0, "Cnst Ind on unconfigured cc\n"); ftdm_assert(g_sngisdn_data.dchans[dChan].num_spans != 0, "Cnst Ind on unconfigured dchan\n"); @@ -196,10 +199,11 @@ void sngisdn_rcv_cnst_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, C void sngisdn_rcv_disc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, DiscEvnt *discEvnt) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info = NULL; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_assert(spInstId != 0, "Received DISCONNECT with invalid id"); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && @@ -231,9 +235,10 @@ void sngisdn_rcv_disc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, D void sngisdn_rcv_rel_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, RelEvnt *relEvnt) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info = NULL; sngisdn_event_data_t *sngisdn_event = NULL; + + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -264,10 +269,11 @@ void sngisdn_rcv_rel_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Re void sngisdn_rcv_dat_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, InfoEvnt *infoEvnt) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -296,9 +302,10 @@ void sngisdn_rcv_dat_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, In void sngisdn_rcv_sshl_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, SsHlEvnt *ssHlEvnt, uint8_t action) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info; sngisdn_event_data_t *sngisdn_event = NULL; + + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -329,9 +336,10 @@ void sngisdn_rcv_sshl_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, S void sngisdn_rcv_sshl_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, SsHlEvnt *ssHlEvnt, uint8_t action) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info; sngisdn_event_data_t *sngisdn_event = NULL; + + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -361,9 +369,10 @@ void sngisdn_rcv_sshl_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, S } void sngisdn_rcv_rmrt_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, RmRtEvnt *rmRtEvnt, uint8_t action) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info; sngisdn_event_data_t *sngisdn_event = NULL; + + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -394,9 +403,10 @@ void sngisdn_rcv_rmrt_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, R void sngisdn_rcv_rmrt_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, RmRtEvnt *rmRtEvnt, uint8_t action) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info; sngisdn_event_data_t *sngisdn_event = NULL; + + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -427,9 +437,10 @@ void sngisdn_rcv_rmrt_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, R void sngisdn_rcv_flc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, StaEvnt *staEvnt) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info; sngisdn_event_data_t *sngisdn_event = NULL; + + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -460,9 +471,10 @@ void sngisdn_rcv_flc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, St void sngisdn_rcv_fac_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, FacEvnt *facEvnt, uint8_t evntType, int16_t dChan, uint8_t ces) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info; sngisdn_event_data_t *sngisdn_event = NULL; + + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -493,9 +505,10 @@ void sngisdn_rcv_fac_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Fa void sngisdn_rcv_sta_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, StaEvnt *staEvnt) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); sngisdn_chan_data_t *sngisdn_info; sngisdn_event_data_t *sngisdn_event = NULL; + + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) && !(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) { @@ -525,11 +538,12 @@ void sngisdn_rcv_sta_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, St void sngisdn_rcv_srv_ind (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); unsigned i; sngisdn_span_data_t *signal_data; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_log(FTDM_LOG_INFO, "Received SERVICE IND (dChan:%d ces:%u)\n", dChan, ces); /* Enqueue the event to each span within the dChan */ @@ -554,11 +568,12 @@ void sngisdn_rcv_srv_ind (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces void sngisdn_rcv_srv_cfm (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); unsigned i; sngisdn_span_data_t *signal_data = NULL; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_log(FTDM_LOG_INFO, "Received SERVICE CFM (dChan:%d ces:%u)\n", dChan, ces); /* Enqueue the event to each span within the dChan */ @@ -582,11 +597,12 @@ void sngisdn_rcv_srv_cfm (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces void sngisdn_rcv_rst_ind (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces, uint8_t evntType) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); unsigned i; sngisdn_span_data_t *signal_data = NULL; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_log(FTDM_LOG_INFO, "Received RESTART IND (dChan:%d ces:%u type:%u)\n", dChan, ces, evntType); /* Enqueue the event to each span within the dChan */ @@ -612,11 +628,12 @@ void sngisdn_rcv_rst_ind (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces void sngisdn_rcv_rst_cfm (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces, uint8_t evntType) { - ISDN_FUNC_TRACE_ENTER(__FUNCTION__); unsigned i; sngisdn_span_data_t *signal_data; sngisdn_event_data_t *sngisdn_event = NULL; + ISDN_FUNC_TRACE_ENTER(__FUNCTION__); + ftdm_log(FTDM_LOG_INFO, "Received RESTART CFM (dChan:%d ces:%u type:%u)\n", dChan, ces, evntType); /* Enqueue the event to each span within the dChan */