git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8688 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-05-27 04:34:23 +00:00
parent 263b226665
commit 9bbcabbbdd
3 changed files with 21 additions and 21 deletions

View File

@ -213,10 +213,10 @@ int main(int argc, char *argv[])
char *usageDesc;
int alt_dirs = 0;
int known_opt;
int high_prio = 0;
int high_prio = 0;
switch_core_flag_t flags = SCF_USE_SQL;
int ret;
switch_file_t *fd;
switch_file_t *fd;
switch_memory_pool_t *pool = NULL;
usageDesc = "these are the optional arguments you can pass to freeswitch\n"
@ -505,7 +505,7 @@ int main(int argc, char *argv[])
}
switch_core_setrlimits();
#ifndef WIN32
if (runas_user || runas_group) {
if (change_user_group(runas_user, runas_group) < 0) {
@ -526,12 +526,12 @@ int main(int argc, char *argv[])
apr_pool_create(&pool, NULL);
if (switch_file_open(&fd,
pid_path,
SWITCH_FOPEN_WRITE | SWITCH_FOPEN_CREATE,
SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE,
pool) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Cannot open pid file %s.\n", pid_path);
return 255;
pid_path,
SWITCH_FOPEN_WRITE | SWITCH_FOPEN_CREATE,
SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE,
pool) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Cannot open pid file %s.\n", pid_path);
return 255;
}
if (switch_file_lock(fd, SWITCH_FLOCK_EXCLUSIVE | SWITCH_FLOCK_NONBLOCK) != SWITCH_STATUS_SUCCESS) {

View File

@ -56,7 +56,7 @@ static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t
retries = 1000;
}
again:
again:
while (begin_retries > 0) {
again = 0;
@ -107,7 +107,7 @@ static switch_status_t switch_core_db_persistant_execute_trans(switch_core_db_t
}
}
done:
done:
switch_core_db_exec(db, "end transaction", NULL, NULL, NULL);
@ -293,7 +293,7 @@ static void core_event_handler(switch_event_t *event)
if (!switch_strlen_zero(state)) {
state_i = atoi(state);
}
switch (state_i) {
case CS_HANGUP:
case CS_DONE:
@ -474,7 +474,7 @@ void switch_core_sqldb_start(switch_memory_pool_t *pool)
}
switch_queue_create(&sql_manager.sql_queue, SWITCH_SQL_QUEUE_LEN, sql_manager.memory_pool);
switch_threadattr_create(&thd_attr, sql_manager.memory_pool);
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);

View File

@ -164,7 +164,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_init(switch_ivr_menu_t ** new_me
menu->confirm_attempts = confirm_attempts;
menu->inlen = digit_len;
menu->max_failures = max_failures;
menu->timeout = timeout;
@ -250,8 +250,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_free(switch_ivr_menu_t * s
if (stack != NULL && stack->pool != NULL) {
if (switch_test_flag(stack, SWITCH_IVR_MENU_FLAG_STACK)
&& switch_test_flag(stack, SWITCH_IVR_MENU_FLAG_FREEPOOL)) {
switch_memory_pool_t *pool = stack->pool;
status = switch_core_destroy_memory_pool(&pool);
switch_memory_pool_t *pool = stack->pool;
status = switch_core_destroy_memory_pool(&pool);
} else {
status = SWITCH_STATUS_SUCCESS;
}
@ -313,7 +313,7 @@ static switch_status_t play_and_collect(switch_core_session_t *session, switch_i
if (menu->confirm_key) {
ap = &confirm_args;
}
switch_ivr_phrase_macro(session, menu->confirm_macro, menu->buf, NULL, ap);
if (menu->confirm_key && *buf == '\0') {
@ -398,17 +398,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s
int ok = 0;
char substituted[1024];
char *use_arg = ap->arg;
if (ap->re) {
switch_regex_t *re = NULL;
int ovector[30];
if ((ok = switch_regex_perform(menu->buf, ap->bind, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
switch_perform_substitution(re, ok, ap->arg, menu->buf, substituted, sizeof(substituted), ovector);
use_arg = substituted;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "action regex [%s] [%s] [%d]\n", menu->buf, ap->bind, ok);
switch_regex_safe_free(re);
} else {
ok = !strcmp(menu->buf, ap->bind);
@ -696,7 +696,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_
const char *confirm_attempts = switch_xml_attr_soft(xml_menu, "confirm-attempts");
const char *digit_len = switch_xml_attr_soft(xml_menu, "digit-len");
const char *inter_timeout = switch_xml_attr_soft(xml_menu, "inter-digit-timeout");
switch_ivr_menu_t *menu = NULL;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "building menu '%s'\n", menu_name);