Update to latest UniMRCP version. MRCP requests can no timeout if there is no server response.

This commit is contained in:
Christopher Rienzo
2011-06-16 16:25:00 +00:00
parent 0555b702db
commit 17099473a3
441 changed files with 17430 additions and 17071 deletions
+2 -1
View File
@@ -8,4 +8,5 @@ apttest_LDADD = $(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
$(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
apttest_SOURCES = src/main.c \
src/task_suite.c \
src/consumer_task_suite.c
src/consumer_task_suite.c \
src/multipart_suite.c
@@ -1,170 +0,0 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="apttest"
ProjectGUID="{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}"
RootNamespace="apttest"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="src"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\src\consumer_task_suite.c"
>
</File>
<File
RelativePath=".\src\main.c"
>
</File>
<File
RelativePath=".\src\task_suite.c"
>
</File>
</Filter>
<Filter
Name="include"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
@@ -283,6 +283,10 @@
RelativePath=".\src\main.c"
>
</File>
<File
RelativePath=".\src\multipart_suite.c"
>
</File>
<File
RelativePath=".\src\task_suite.c"
>
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,6 +12,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: consumer_task_suite.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <apr_time.h>
+7 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,6 +12,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: main.c 1539 2010-02-22 19:49:33Z achaloyan $
*/
#include "apt_test_suite.h"
@@ -19,6 +21,7 @@
apt_test_suite_t* task_test_suite_create(apr_pool_t *pool);
apt_test_suite_t* consumer_task_test_suite_create(apr_pool_t *pool);
apt_test_suite_t* multipart_test_suite_create(apr_pool_t *pool);
int main(int argc, const char * const *argv)
{
@@ -42,6 +45,9 @@ int main(int argc, const char * const *argv)
test_suite = consumer_task_test_suite_create(pool);
apt_test_framework_suite_add(test_framework,test_suite);
test_suite = multipart_test_suite_create(pool);
apt_test_framework_suite_add(test_framework,test_suite);
/* run tests */
apt_test_framework_run(test_framework,argc,argv);
@@ -0,0 +1,98 @@
/*
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: multipart_suite.c 1673 2010-04-28 20:45:47Z achaloyan $
*/
#include "apt_test_suite.h"
#include "apt_multipart_content.h"
#include "apt_log.h"
static apt_str_t* multipart_content_generate(apt_test_suite_t *suite)
{
apt_multipart_content_t *multipart = apt_multipart_content_create(1500,NULL,suite->pool);
apt_str_t content_type;
apt_str_t content;
apt_str_t *body;
apt_string_set(&content_type,"text/plain");
apt_string_set(&content,"This is the content of the first part");
apt_multipart_content_add2(multipart,&content_type,NULL,&content);
apt_string_set(&content_type,"application/ssml+xml");
apt_string_set(&content,
"<?xml version=\"1.0\"?>\r\n"
"<speak version=\"1.0\"\r\n"
"<p> <s>You have 4 new messages.</s> </p>\r\n"
"</speak>");
apt_multipart_content_add2(multipart,&content_type,NULL,&content);
body = apt_multipart_content_finalize(multipart);
if(body) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Genereted Multipart Content [%lu bytes]\n%s",
body->length,
body->buf);
}
return body;
}
static apt_bool_t multipart_content_parse(apt_test_suite_t *suite, apt_str_t *body)
{
apt_multipart_content_t *multipart = apt_multipart_content_assign(body,NULL,suite->pool);
if(multipart) {
apt_bool_t is_final;
apt_content_part_t content_part;
while(apt_multipart_content_get(multipart,&content_part,&is_final) == TRUE) {
if(is_final == TRUE) {
break;
}
if(content_part.type && apt_string_is_empty(content_part.type) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Content Part Type: %.*s",
content_part.type->length,
content_part.type->buf);
}
if(content_part.id && apt_string_is_empty(content_part.id) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Content Part Id: %.*s",
content_part.id->length,
content_part.id->buf);
}
if(content_part.length && apt_string_is_empty(content_part.length) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Content Part Length: %.*s\n%.*s",
content_part.length->length,
content_part.length->buf,
content_part.body.length,
content_part.body.buf);
}
}
}
return TRUE;
}
static apt_bool_t multipart_test_run(apt_test_suite_t *suite, int argc, const char * const *argv)
{
apt_bool_t status = FALSE;
apt_str_t *body = multipart_content_generate(suite);
if(body) {
status = multipart_content_parse(suite,body);
}
return status;
}
apt_test_suite_t* multipart_test_suite_create(apr_pool_t *pool)
{
apt_test_suite_t *suite = apt_test_suite_create(pool,"multipart",NULL,multipart_test_run);
return suite;
}
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* Copyright 2008-2010 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -12,6 +12,8 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: task_suite.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include "apt_test_suite.h"