From b64cc02390637fc977cd1527e93e8ab294a6a36e Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Mon, 19 Nov 2012 10:23:46 -0500 Subject: [PATCH] freetdm: ftmod_zt - Declare tone mode at the top to avoid compilation errors --- libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c b/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c index 8d4ee8ab6f..c088c1453f 100644 --- a/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c +++ b/libs/freetdm/src/ftmod/ftmod_zt/ftmod_zt.c @@ -274,6 +274,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f { unsigned configured = 0, x; zt_params_t ztp; + zt_tone_mode_t mode = 0; memset(&ztp, 0, sizeof(ztp)); @@ -439,7 +440,7 @@ static unsigned zt_open_range(ftdm_span_t *span, unsigned start, unsigned end, f continue; } - zt_tone_mode_t mode = ZT_TONEDETECT_ON | ZT_TONEDETECT_MUTE; + mode = ZT_TONEDETECT_ON | ZT_TONEDETECT_MUTE; if (ioctl(sockfd, codes.TONEDETECT, &mode)) { ftdm_log(FTDM_LOG_DEBUG, "HW DTMF not available on FreeTDM device %d:%d fd:%d\n", ftdmchan->span_id, ftdmchan->chan_id, sockfd); } else {