diff --git a/libs/freetdm/mod_openzap/mod_openzap.c b/libs/freetdm/mod_openzap/mod_openzap.c index ffdab55b1f..27ca737669 100644 --- a/libs/freetdm/mod_openzap/mod_openzap.c +++ b/libs/freetdm/mod_openzap/mod_openzap.c @@ -338,7 +338,6 @@ static switch_status_t channel_waitfor_write(switch_core_session_t *session, int static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *dtmf) { private_t *tech_pvt = NULL; - char *digit; tech_pvt = switch_core_session_get_private(session); assert(tech_pvt != NULL); @@ -352,9 +351,9 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch { switch_channel_t *channel = NULL; private_t *tech_pvt = NULL; - zap_size_t len; + uint32_t len; zap_wait_flag_t wflags = ZAP_READ; - uint8_t dtmf[128] = ""; + char dtmf[128] = ""; zap_status_t status; channel = switch_core_session_get_channel(session); @@ -509,8 +508,6 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi private_t *tech_pvt; switch_channel_t *channel; switch_caller_profile_t *caller_profile; - unsigned int req = 0, cap = 0; - unsigned short samprate = 0; switch_core_session_add_stream(*new_session, NULL); if ((tech_pvt = (private_t *) switch_core_session_alloc(*new_session, sizeof(private_t))) != 0) { @@ -637,7 +634,7 @@ static void zap_logger(char *file, const char *func, int line, int level, char * static switch_status_t load_config(void) { char *cf = "openzap.conf"; - switch_xml_t cfg, xml, settings, param, spans, span; + switch_xml_t cfg, xml, settings, param, spans, myspan; memset(&globals, 0, sizeof(globals)); switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool); @@ -658,9 +655,9 @@ static switch_status_t load_config(void) } if ((spans = switch_xml_child(cfg, "analog_spans"))) { - for (span = switch_xml_child(spans, "span"); span; span = span->next) { - char *mod = (char *) switch_xml_attr_soft(span, "module"); - char *id = (char *) switch_xml_attr_soft(span, "id"); + for (myspan = switch_xml_child(spans, "span"); myspan; myspan = myspan->next) { + char *mod = (char *) switch_xml_attr_soft(myspan, "module"); + char *id = (char *) switch_xml_attr_soft(myspan, "id"); char *context = "default"; char *dialplan = "XML"; char *tonegroup = NULL; @@ -669,7 +666,7 @@ static switch_status_t load_config(void) uint32_t span_id = 0, to = 0, max = 0; zap_span_t *span = NULL; - for (param = switch_xml_child(span, "param"); param; param = param->next) { + for (param = switch_xml_child(myspan, "param"); param; param = param->next) { char *var = (char *) switch_xml_attr_soft(param, "name"); char *val = (char *) switch_xml_attr_soft(param, "value"); diff --git a/libs/freetdm/mod_openzap/mod_openzap.vcproj b/libs/freetdm/mod_openzap/mod_openzap.vcproj new file mode 100644 index 0000000000..a1ebe71e9a --- /dev/null +++ b/libs/freetdm/mod_openzap/mod_openzap.vcproj @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/freetdm/msvc/testanalog/testanalog.vcproj b/libs/freetdm/msvc/testanalog/testanalog.vcproj index df5ccd2fba..7f762fe4ad 100644 --- a/libs/freetdm/msvc/testanalog/testanalog.vcproj +++ b/libs/freetdm/msvc/testanalog/testanalog.vcproj @@ -47,7 +47,8 @@ BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" - WarningLevel="3" + WarningLevel="4" + WarnAsError="true" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> @@ -122,7 +123,8 @@ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" UsePrecompiledHeader="0" - WarningLevel="3" + WarningLevel="4" + WarnAsError="true" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> diff --git a/libs/freetdm/msvc/testisdn/testisdn.vcproj b/libs/freetdm/msvc/testisdn/testisdn.vcproj index dac179de1a..cce13b7653 100644 --- a/libs/freetdm/msvc/testisdn/testisdn.vcproj +++ b/libs/freetdm/msvc/testisdn/testisdn.vcproj @@ -47,7 +47,8 @@ BasicRuntimeChecks="3" RuntimeLibrary="3" UsePrecompiledHeader="0" - WarningLevel="3" + WarningLevel="4" + WarnAsError="true" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> @@ -122,7 +123,8 @@ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" UsePrecompiledHeader="0" - WarningLevel="3" + WarningLevel="4" + WarnAsError="true" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> diff --git a/libs/freetdm/openzap.sln b/libs/freetdm/openzap.sln index 873dd25d72..ab53115d35 100644 --- a/libs/freetdm/openzap.sln +++ b/libs/freetdm/openzap.sln @@ -21,6 +21,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testisdn", "msvc\testisdn\t {93B8812C-3EC4-4F78-8970-FFBFC99E167D} = {93B8812C-3EC4-4F78-8970-FFBFC99E167D} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_openzap", "mod_openzap\mod_openzap.vcproj", "{FE3540C5-3303-46E0-A69E-D92F775687F1}" + ProjectSection(ProjectDependencies) = postProject + {93B8812C-3EC4-4F78-8970-FFBFC99E167D} = {93B8812C-3EC4-4F78-8970-FFBFC99E167D} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -39,6 +44,10 @@ Global {6DA6FD42-641D-4147-92F5-3BC4AAA6589B}.Debug|Win32.Build.0 = Debug|Win32 {6DA6FD42-641D-4147-92F5-3BC4AAA6589B}.Release|Win32.ActiveCfg = Release|Win32 {6DA6FD42-641D-4147-92F5-3BC4AAA6589B}.Release|Win32.Build.0 = Release|Win32 + {FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug|Win32.Build.0 = Debug|Win32 + {FE3540C5-3303-46E0-A69E-D92F775687F1}.Release|Win32.ActiveCfg = Release|Win32 + {FE3540C5-3303-46E0-A69E-D92F775687F1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE