fix leak when call hangs up or other error condition while saying an ip address (add mod_say_zh to windows build)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9184 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
423275120c
commit
7f5211b40d
|
@ -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}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue