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

This commit is contained in:
Christopher Rienzo committed 2011-06-16 16:25:00 +00:00
1 parent 0555b702db
commit 17099473a3
441 files changed
+17430 -17071

No files matched your search

@@ -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 1785 2010-09-22 06:14:29Z achaloyan $
*/
#include <stdlib.h>
@@ -22,10 +24,10 @@
#include "apt_log.h"
typedef struct {
const char *root_dir_path;
apt_bool_t foreground;
apt_log_priority_e log_priority;
apt_log_output_e log_output;
const char *root_dir_path;
apt_bool_t foreground;
const char *log_priority;
const char *log_output;
} server_options_t;
#ifdef WIN32
@@ -98,14 +100,10 @@ static apt_bool_t options_load(server_options_t *options, int argc, const char *
options->root_dir_path = optarg;
break;
case 'l':
if(optarg) {
options->log_priority = atoi(optarg);
}
options->log_priority = optarg;
break;
case 'o':
if(optarg) {
options->log_output = atoi(optarg);
}
options->log_output = optarg;
break;
#ifdef WIN32
case 's':
@@ -135,6 +133,7 @@ int main(int argc, const char * const *argv)
apr_pool_t *pool = NULL;
server_options_t options;
apt_dir_layout_t *dir_layout;
const char *log_conf_path;
/* APR global initialization */
if(apr_initialize() != APR_SUCCESS) {
@@ -152,8 +151,8 @@ int main(int argc, const char * const *argv)
/* set the default options */
options.root_dir_path = "../";
options.foreground = TRUE;
options.log_priority = APT_PRIO_INFO;
options.log_output = APT_LOG_OUTPUT_CONSOLE;
options.log_priority = NULL;
options.log_output = NULL;
/* load options */
if(options_load(&options,argc,argv,pool) != TRUE) {
@@ -164,12 +163,24 @@ int main(int argc, const char * const *argv)
/* create the structure of default directories layout */
dir_layout = apt_default_dir_layout_create(options.root_dir_path,pool);
/* create singleton logger */
apt_log_instance_create(options.log_output,options.log_priority,pool);
/* get path to logger configuration file */
log_conf_path = apt_confdir_filepath_get(dir_layout,"logger.xml",pool);
/* create and load singleton logger */
apt_log_instance_load(log_conf_path,pool);
if((options.log_output & APT_LOG_OUTPUT_FILE) == APT_LOG_OUTPUT_FILE) {
if(options.log_priority) {
/* override the log priority, if specified in command line */
apt_log_priority_set(atoi(options.log_priority));
}
if(options.log_output) {
/* override the log output mode, if specified in command line */
apt_log_output_mode_set(atoi(options.log_output));
}
if(apt_log_output_mode_check(APT_LOG_OUTPUT_FILE) == TRUE) {
/* open the log file */
apt_log_file_open(dir_layout->log_dir_path,"unimrcpserver",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,pool);
apt_log_file_open(dir_layout->log_dir_path,"unimrcpserver",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,TRUE,pool);
}
if(options.foreground == TRUE) {
@@ -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: uni_cmdline.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <stdio.h>
@@ -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: uni_daemon.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <apr_signal.h>
@@ -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: uni_service.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <windows.h>