mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-31 07:34:19 +00:00
if space
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15893 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
376861fd8c
commit
21e3bb970a
24 files changed
+167
-167
No files matched your search
@@ -117,7 +117,7 @@ static switch_status_t config_callback_dsn(switch_xml_config_item_t *data, const
|
||||
|
||||
if ((callback_type == CONFIG_LOAD || callback_type == CONFIG_RELOAD) && changed) {
|
||||
|
||||
if(zstr(newvalue)) {
|
||||
if (zstr(newvalue)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "No local database defined.\n");
|
||||
} else {
|
||||
switch_safe_free(globals.odbc_dsn);
|
||||
|
||||
@@ -1876,7 +1876,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
|
||||
|
||||
member->score_iir = (int)(((1.0 - SCORE_DECAY) * (float)member->score) + (SCORE_DECAY * (float)member->score_iir));
|
||||
|
||||
if(member->score_iir > SCORE_MAX_IIR) {
|
||||
if (member->score_iir > SCORE_MAX_IIR) {
|
||||
member->score_iir = SCORE_MAX_IIR;
|
||||
}
|
||||
|
||||
@@ -5197,11 +5197,11 @@ SWITCH_STANDARD_APP(conference_function)
|
||||
switch_channel_set_variable(channel, "conference_name", conference->name);
|
||||
|
||||
/* Set MOH from variable if not set */
|
||||
if(zstr(conference->moh_sound)) {
|
||||
if (zstr(conference->moh_sound)) {
|
||||
conference->moh_sound = switch_core_strdup(conference->pool, switch_channel_get_variable(channel, "conference_moh_sound"));
|
||||
}
|
||||
/* Set perpetual-sound from variable if not set */
|
||||
if(zstr(conference->perpetual_sound)) {
|
||||
if (zstr(conference->perpetual_sound)) {
|
||||
conference->perpetual_sound = switch_core_strdup(conference->pool, switch_channel_get_variable(channel, "conference_perpetual_sound"));
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ static http_data_t *do_lookup_url(switch_memory_pool_t *pool, const char *url, c
|
||||
}
|
||||
if (!strcasecmp(method, "head")) {
|
||||
curl_easy_setopt(curl_handle, CURLOPT_NOBODY, SWITCH_TRUE);
|
||||
} else if(!strcasecmp(method, "post")) {
|
||||
} else if (!strcasecmp(method, "post")) {
|
||||
curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDSIZE, strlen(data));
|
||||
curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS, (void *) data);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Post data: %s\n", data);
|
||||
@@ -288,7 +288,7 @@ SWITCH_STANDARD_APP(curl_app_function)
|
||||
switch_channel_set_variable(channel, "curl_response_data", print_json(pool, http_data));
|
||||
} else {
|
||||
SWITCH_STANDARD_STREAM(stream);
|
||||
if(do_headers) {
|
||||
if (do_headers) {
|
||||
slist = http_data->headers;
|
||||
while(slist) {
|
||||
stream.write_function(&stream, "%s\n", slist->data);
|
||||
@@ -376,7 +376,7 @@ SWITCH_STANDARD_API(curl_function)
|
||||
if (do_json) {
|
||||
stream->write_function(stream, "%s", print_json(pool, http_data));
|
||||
} else {
|
||||
if(do_headers) {
|
||||
if (do_headers) {
|
||||
slist = http_data->headers;
|
||||
while(slist) {
|
||||
stream->write_function(stream, "%s\n", slist->data);
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
/* Defines for error checking */
|
||||
#include <errno.h>
|
||||
|
||||
#if(EXPR_ERROR_LEVEL >= EXPR_ERROR_LEVEL_CHECK)
|
||||
#if (EXPR_ERROR_LEVEL >= EXPR_ERROR_LEVEL_CHECK)
|
||||
#define EXPR_RESET_ERR() errno = 0
|
||||
#define EXPR_CHECK_ERR() if(errno) return EXPR_ERROR_OUTOFRANGE
|
||||
#define EXPR_CHECK_ERR() if (errno) return EXPR_ERROR_OUTOFRANGE
|
||||
#else
|
||||
#define EXPR_RESET_ERR()
|
||||
#define EXPR_CHECK_ERR()
|
||||
@@ -136,7 +136,7 @@ int exprEvalNode(exprObj * obj, exprNode * nodes, int curnode, EXPRTYPE * val)
|
||||
if (d2 != 0.0)
|
||||
*val = d1 / d2;
|
||||
else {
|
||||
#if(EXPR_ERROR_LEVEL >= EXPR_ERROR_LEVEL_CHECK)
|
||||
#if (EXPR_ERROR_LEVEL >= EXPR_ERROR_LEVEL_CHECK)
|
||||
return EXPR_ERROR_DIVBYZERO;
|
||||
#else
|
||||
*val = 0.0;
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
/* Macro for adding a function node type */
|
||||
#define EXPR_ADDFUNC_TYPE(name, type, argmin, argmax, refmin, refmax) \
|
||||
err = exprFuncListAddType(flist, name, type, argmin, argmax, refmin, refmax); \
|
||||
if(err != EXPR_ERROR_NOERROR) \
|
||||
if (err != EXPR_ERROR_NOERROR) \
|
||||
return err;
|
||||
|
||||
/* Macro for adding a constant */
|
||||
#define EXPR_ADDCONST(name, val) \
|
||||
err = exprValListAdd(vlist, name, val); \
|
||||
if(err != EXPR_ERROR_NOERROR) \
|
||||
if (err != EXPR_ERROR_NOERROR) \
|
||||
return err;
|
||||
|
||||
/* Call this function to initialize these functions into a function list */
|
||||
|
||||
@@ -878,7 +878,7 @@ SWITCH_STANDARD_APP(fifo_function)
|
||||
node_list[node_count++] = node;
|
||||
}
|
||||
|
||||
if(switch_true(switch_channel_get_variable(channel, "fifo_destroy_after_use"))) {
|
||||
if (switch_true(switch_channel_get_variable(channel, "fifo_destroy_after_use"))) {
|
||||
node->ready = FIFO_DELAY_DESTROY;
|
||||
}
|
||||
|
||||
|
||||
@@ -199,18 +199,18 @@ static const char *do_cid(switch_memory_pool_t *pool, const char *cid, const cha
|
||||
}
|
||||
|
||||
/* if a session is provided, check if the source part of the regex has any channel variables, then expand them */
|
||||
if(session) {
|
||||
if (session) {
|
||||
channel = switch_core_session_get_channel(session);
|
||||
switch_assert(channel);
|
||||
|
||||
if(switch_string_var_check_const(src) || switch_string_has_escaped_data(src)) {
|
||||
if (switch_string_var_check_const(src) || switch_string_has_escaped_data(src)) {
|
||||
tmp_regex = switch_channel_expand_variables(channel, src);
|
||||
src_regex = switch_core_strdup(pool, tmp_regex);
|
||||
switch_safe_free(tmp_regex);
|
||||
src = src_regex;
|
||||
}
|
||||
|
||||
if(switch_string_var_check_const(dst) || switch_string_has_escaped_data(dst)) {
|
||||
if (switch_string_var_check_const(dst) || switch_string_has_escaped_data(dst)) {
|
||||
tmp_regex = switch_channel_expand_variables(channel, dst);
|
||||
dst_regex = switch_core_strdup(pool, tmp_regex);
|
||||
switch_safe_free(tmp_regex);
|
||||
@@ -426,7 +426,7 @@ static switch_bool_t set_db_random()
|
||||
db_random = "rand()";
|
||||
return SWITCH_TRUE;
|
||||
}
|
||||
if(db_check("SELECT random();") == SWITCH_TRUE) {
|
||||
if (db_check("SELECT random();") == SWITCH_TRUE) {
|
||||
db_random = "random()";
|
||||
return SWITCH_TRUE;
|
||||
}
|
||||
@@ -1354,9 +1354,9 @@ SWITCH_STANDARD_API(dialplan_lcr_function)
|
||||
if (!strcasecmp(argv[i], "intrastate")) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Select routes based on intrastate rates\n");
|
||||
cb_struct.intrastate = SWITCH_TRUE;
|
||||
} else if(!strcasecmp(argv[i], "as")) {
|
||||
} else if (!strcasecmp(argv[i], "as")) {
|
||||
i++;
|
||||
if(argv[i] && !strcasecmp(argv[i], "xml")) {
|
||||
if (argv[i] && !strcasecmp(argv[i], "xml")) {
|
||||
as_xml = SWITCH_TRUE;
|
||||
} else {
|
||||
goto usage;
|
||||
|
||||
@@ -183,11 +183,11 @@ SWITCH_STANDARD_API(memcache_function)
|
||||
key = argv[1];
|
||||
val = argv[2];
|
||||
|
||||
if(argc > 3) {
|
||||
if (argc > 3) {
|
||||
expires_str = argv[3];
|
||||
expires = (time_t)strtol(expires_str, NULL, 10);
|
||||
}
|
||||
if(argc > 4) {
|
||||
if (argc > 4) {
|
||||
flags_str = argv[4];
|
||||
flags = (uint32_t)strtol(flags_str, NULL, 16);
|
||||
}
|
||||
@@ -239,11 +239,11 @@ SWITCH_STANDARD_API(memcache_function)
|
||||
} else {
|
||||
svalue = "1";
|
||||
}
|
||||
if(argc > 3) {
|
||||
if (argc > 3) {
|
||||
expires_str = argv[3];
|
||||
expires = (time_t)strtol(expires_str, NULL, 10);
|
||||
}
|
||||
if(argc > 4) {
|
||||
if (argc > 4) {
|
||||
flags_str = argv[4];
|
||||
flags = (uint32_t)strtol(flags_str, NULL, 16);
|
||||
}
|
||||
@@ -280,7 +280,7 @@ SWITCH_STANDARD_API(memcache_function)
|
||||
}
|
||||
} else if (!strcasecmp(subcmd, "delete") && argc > 1) {
|
||||
key = argv[1];
|
||||
if(argc > 2) {
|
||||
if (argc > 2) {
|
||||
expires_str = argv[3];
|
||||
expires = (time_t)strtol(expires_str, NULL, 10);
|
||||
}
|
||||
@@ -291,7 +291,7 @@ SWITCH_STANDARD_API(memcache_function)
|
||||
switch_goto_status(SWITCH_STATUS_SUCCESS, mcache_error);
|
||||
}
|
||||
} else if (!strcasecmp(subcmd, "flush")) {
|
||||
if(argc > 1) {
|
||||
if (argc > 1) {
|
||||
expires_str = argv[3];
|
||||
expires = (time_t)strtol(expires_str, NULL, 10);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user