[Freeswitch-svn] [commit] r8688 - freeswitch/trunk/src
Freeswitch SVN
mikej at freeswitch.org
Tue May 27 00:34:23 EDT 2008
Author: mikej
Date: Tue May 27 00:34:23 2008
New Revision: 8688
Modified:
freeswitch/trunk/src/switch.c
freeswitch/trunk/src/switch_core_sqldb.c
freeswitch/trunk/src/switch_ivr_menu.c
Log:
indent
Modified: freeswitch/trunk/src/switch.c
==============================================================================
--- freeswitch/trunk/src/switch.c (original)
+++ freeswitch/trunk/src/switch.c Tue May 27 00:34:23 2008
@@ -213,10 +213,10 @@
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 @@
}
switch_core_setrlimits();
-
+
#ifndef WIN32
if (runas_user || runas_group) {
if (change_user_group(runas_user, runas_group) < 0) {
@@ -526,12 +526,12 @@
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) {
Modified: freeswitch/trunk/src/switch_core_sqldb.c
==============================================================================
--- freeswitch/trunk/src/switch_core_sqldb.c (original)
+++ freeswitch/trunk/src/switch_core_sqldb.c Tue May 27 00:34:23 2008
@@ -56,7 +56,7 @@
retries = 1000;
}
- again:
+again:
while (begin_retries > 0) {
again = 0;
@@ -107,7 +107,7 @@
}
}
- done:
+done:
switch_core_db_exec(db, "end transaction", NULL, NULL, NULL);
@@ -293,7 +293,7 @@
if (!switch_strlen_zero(state)) {
state_i = atoi(state);
}
-
+
switch (state_i) {
case CS_HANGUP:
case CS_DONE:
@@ -474,7 +474,7 @@
}
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);
Modified: freeswitch/trunk/src/switch_ivr_menu.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_menu.c (original)
+++ freeswitch/trunk/src/switch_ivr_menu.c Tue May 27 00:34:23 2008
@@ -164,7 +164,7 @@
menu->confirm_attempts = confirm_attempts;
menu->inlen = digit_len;
-
+
menu->max_failures = max_failures;
menu->timeout = timeout;
@@ -250,8 +250,8 @@
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 @@
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 @@
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 @@
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);
More information about the Freeswitch-svn
mailing list