diff --git a/Freeswitch.2008.sln b/Freeswitch.2008.sln index 5ca0ba9cb0..0d2e5a0a0d 100644 --- a/Freeswitch.2008.sln +++ b/Freeswitch.2008.sln @@ -961,6 +961,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_snom", "src\mod\applica {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_zh", "src\mod\say\mod_say_zh\mod_say_zh.2008.vcproj", "{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}" + ProjectSection(ProjectDependencies) = postProject + {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -1662,6 +1667,12 @@ Global {2A3D00C6-588D-4E86-81AC-9EF5EDE86E03}.Release|Win32.ActiveCfg = Release|Win32 {2A3D00C6-588D-4E86-81AC-9EF5EDE86E03}.Release|Win32.Build.0 = Release|Win32 {2A3D00C6-588D-4E86-81AC-9EF5EDE86E03}.Release|x64.ActiveCfg = Release|Win32 + {B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.Debug|Win32.ActiveCfg = Debug|Win32 + {B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.Debug|Win32.Build.0 = Debug|Win32 + {B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.Debug|x64.ActiveCfg = Debug|Win32 + {B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.Release|Win32.ActiveCfg = Release|Win32 + {B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.Release|Win32.Build.0 = Release|Win32 + {B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1771,6 +1782,7 @@ Global {06E3A538-AB32-44F2-B477-755FF9CB5D37} = {6CD61A1D-797C-470A-BE08-8C31B68BB336} {6D1BEC70-4DCD-4FE9-ADBD-4A43A67E4D05} = {6CD61A1D-797C-470A-BE08-8C31B68BB336} {A4B122CF-5196-476B-8C0E-D8BD59AC3C14} = {6CD61A1D-797C-470A-BE08-8C31B68BB336} + {B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E} = {6CD61A1D-797C-470A-BE08-8C31B68BB336} {3B08FEFD-4D3D-4C16-BA94-EE83509E32A0} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8} {7BFD517E-7F8F-4A40-A78E-8D3632738227} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8} {6374D55C-FABE-4A02-9CF1-4145308A56C5} = {57D119DC-484F-420F-B9E9-8589FD9A8DF8} diff --git a/src/mod/say/mod_say_de/mod_say_de.c b/src/mod/say/mod_say_de/mod_say_de.c index cd2b3a37d5..b3ad8e5472 100644 --- a/src/mod/say/mod_say_de/mod_say_de.c +++ b/src/mod/say/mod_say_de/mod_say_de.c @@ -236,28 +236,24 @@ static switch_status_t de_say_general_count(switch_core_session_t *session, static switch_status_t de_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) { char *a, *b, *c, *d; - switch_status_t status = SWITCH_STATUS_SUCCESS; - if (!(a = strdup(tosay))) { + if (!(a = switch_core_session_strdup(session, tosay))) { return SWITCH_STATUS_FALSE; } if (!(b = strchr(a, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *b++ = '\0'; if (!(c = strchr(b, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *c++ = '\0'; if (!(d = strchr(c, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *d++ = '\0'; @@ -270,9 +266,7 @@ static switch_status_t de_ip(switch_core_session_t *session, char *tosay, switch say_file("digits/dot.wav"); say_num(atoi(d), method); - done: - switch_safe_free(a); - return status; + return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/say/mod_say_en/mod_say_en.c b/src/mod/say/mod_say_en/mod_say_en.c index e711473249..9932940c26 100644 --- a/src/mod/say/mod_say_en/mod_say_en.c +++ b/src/mod/say/mod_say_en/mod_say_en.c @@ -225,28 +225,24 @@ static switch_status_t en_say_general_count(switch_core_session_t *session, static switch_status_t en_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) { char *a, *b, *c, *d; - switch_status_t status = SWITCH_STATUS_SUCCESS; - if (!(a = strdup(tosay))) { + if (!(a = switch_core_session_strdup(session, tosay))) { return SWITCH_STATUS_FALSE; } if (!(b = strchr(a, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *b++ = '\0'; if (!(c = strchr(b, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *c++ = '\0'; if (!(d = strchr(c, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *d++ = '\0'; @@ -259,9 +255,7 @@ static switch_status_t en_ip(switch_core_session_t *session, char *tosay, switch say_file("digits/dot.wav"); say_num(atoi(d), method); - done: - switch_safe_free(a); - return status; + return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/say/mod_say_es/mod_say_es.c b/src/mod/say/mod_say_es/mod_say_es.c index 3dc368f195..dea585740d 100644 --- a/src/mod/say/mod_say_es/mod_say_es.c +++ b/src/mod/say/mod_say_es/mod_say_es.c @@ -225,28 +225,24 @@ static switch_status_t es_say_general_count(switch_core_session_t *session, static switch_status_t es_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) { char *a, *b, *c, *d; - switch_status_t status = SWITCH_STATUS_SUCCESS; - if (!(a = strdup(tosay))) { + if (!(a = switch_core_session_strdup(session, tosay))) { return SWITCH_STATUS_FALSE; } if (!(b = strchr(a, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *b++ = '\0'; if (!(c = strchr(b, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *c++ = '\0'; if (!(d = strchr(c, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *d++ = '\0'; @@ -259,9 +255,7 @@ static switch_status_t es_ip(switch_core_session_t *session, char *tosay, switch say_file("digits/dot.wav"); say_num(atoi(d), method); - done: - switch_safe_free(a); - return status; + return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/say/mod_say_fr/mod_say_fr.c b/src/mod/say/mod_say_fr/mod_say_fr.c index 75b3f70ba1..32304a4464 100644 --- a/src/mod/say/mod_say_fr/mod_say_fr.c +++ b/src/mod/say/mod_say_fr/mod_say_fr.c @@ -225,28 +225,24 @@ static switch_status_t fr_say_general_count(switch_core_session_t *session, static switch_status_t fr_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) { char *a, *b, *c, *d; - switch_status_t status = SWITCH_STATUS_SUCCESS; - if (!(a = strdup(tosay))) { + if (!(a = switch_core_session_strdup(session, tosay))) { return SWITCH_STATUS_FALSE; } if (!(b = strchr(a, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *b++ = '\0'; if (!(c = strchr(b, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *c++ = '\0'; if (!(d = strchr(c, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *d++ = '\0'; @@ -259,9 +255,7 @@ static switch_status_t fr_ip(switch_core_session_t *session, char *tosay, switch say_file("digits/dot.wav"); say_num(atoi(d), method); - done: - switch_safe_free(a); - return status; + return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/say/mod_say_it/mod_say_it.c b/src/mod/say/mod_say_it/mod_say_it.c index d0c85a388e..b1bb4d0f47 100644 --- a/src/mod/say/mod_say_it/mod_say_it.c +++ b/src/mod/say/mod_say_it/mod_say_it.c @@ -225,28 +225,24 @@ static switch_status_t it_say_general_count(switch_core_session_t *session, static switch_status_t it_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) { char *a, *b, *c, *d; - switch_status_t status = SWITCH_STATUS_SUCCESS; - if (!(a = strdup(tosay))) { + if (!(a = switch_core_session_strdup(session, tosay))) { return SWITCH_STATUS_FALSE; } if (!(b = strchr(a, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *b++ = '\0'; if (!(c = strchr(b, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *c++ = '\0'; if (!(d = strchr(c, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *d++ = '\0'; @@ -259,9 +255,7 @@ static switch_status_t it_ip(switch_core_session_t *session, char *tosay, switch say_file("digits/dot.wav"); say_num(atoi(d), method); - done: - switch_safe_free(a); - return status; + return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/say/mod_say_nl/mod_say_nl.c b/src/mod/say/mod_say_nl/mod_say_nl.c index d19e11b042..6342015351 100644 --- a/src/mod/say/mod_say_nl/mod_say_nl.c +++ b/src/mod/say/mod_say_nl/mod_say_nl.c @@ -225,28 +225,24 @@ static switch_status_t nl_say_general_count(switch_core_session_t *session, static switch_status_t nl_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) { char *a, *b, *c, *d; - switch_status_t status = SWITCH_STATUS_SUCCESS; - if (!(a = strdup(tosay))) { + if (!(a = switch_core_session_strdup(session, tosay))) { return SWITCH_STATUS_FALSE; } if (!(b = strchr(a, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *b++ = '\0'; if (!(c = strchr(b, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *c++ = '\0'; if (!(d = strchr(c, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; + return SWITCH_STATUS_FALSE; } *d++ = '\0'; @@ -259,9 +255,7 @@ static switch_status_t nl_ip(switch_core_session_t *session, char *tosay, switch say_file("digits/dot.wav"); say_num(atoi(d), method); - done: - switch_safe_free(a); - return status; + return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/say/mod_say_zh/mod_say_zh.2008.vcproj b/src/mod/say/mod_say_zh/mod_say_zh.2008.vcproj index 386a2361eb..1869113bff 100644 --- a/src/mod/say/mod_say_zh/mod_say_zh.2008.vcproj +++ b/src/mod/say/mod_say_zh/mod_say_zh.2008.vcproj @@ -3,7 +3,7 @@ ProjectType="Visual C++" Version="9.00" Name="mod_say_zh" - ProjectGUID="{988CACF7-3FCB-4992-BE69-77872AE67DC8}" + ProjectGUID="{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}" RootNamespace="mod_say_zh" Keyword="Win32Proj" TargetFrameworkVersion="131072" diff --git a/src/mod/say/mod_say_zh/mod_say_zh.c b/src/mod/say/mod_say_zh/mod_say_zh.c index fb186e1460..2c5f07ecbf 100644 --- a/src/mod/say/mod_say_zh/mod_say_zh.c +++ b/src/mod/say/mod_say_zh/mod_say_zh.c @@ -290,51 +290,41 @@ static switch_status_t zh_say_general_count(switch_core_session_t *session, } -static switch_status_t zh_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) -{ - char *a; - char *b; - char *c; - char *d; - - switch_status_t status = SWITCH_STATUS_SUCCESS; - if (!(a = strdup(tosay))) { - return SWITCH_STATUS_FALSE; - } - - if (!(b = strchr(a, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; - } - - *b++ = '\0'; - - if (!(c = strchr(b, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; - } - - *c++ = '\0'; - - if (!(d = strchr(c, '.'))) { - status = SWITCH_STATUS_FALSE; - goto done; - } - - *d++ = '\0'; - - say_num(atoi(a), method); - say_file("digits/dot.wav"); - say_num(atoi(b), method); - say_file("digits/dot.wav"); - say_num(atoi(c), method); - say_file("digits/dot.wav"); - say_num(atoi(d), method); - -done: - switch_safe_free(a); - return status; -} +static switch_status_t zh_ip(switch_core_session_t *session, char *tosay, switch_say_type_t type, switch_say_method_t method, switch_input_args_t *args) +{ + char *a, *b, *c, *d; + if (!(a = switch_core_session_strdup(session, tosay))) { + return SWITCH_STATUS_FALSE; + } + + if (!(b = strchr(a, '.'))) { + return SWITCH_STATUS_FALSE; + } + + *b++ = '\0'; + + if (!(c = strchr(b, '.'))) { + return SWITCH_STATUS_FALSE; + } + + *c++ = '\0'; + + if (!(d = strchr(c, '.'))) { + return SWITCH_STATUS_FALSE; + } + + *d++ = '\0'; + + say_num(atoi(a), method); + say_file("digits/dot.wav"); + say_num(atoi(b), method); + say_file("digits/dot.wav"); + say_num(atoi(c), method); + say_file("digits/dot.wav"); + say_num(atoi(d), method); + + return SWITCH_STATUS_SUCCESS; +} static switch_status_t zh_say_time(switch_core_session_t *session, char *tosay,