fixing if's to be correct
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12001 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ba03619be5
commit
2633fad70e
|
@ -761,7 +761,7 @@ void sofia_reg_release_gateway__(const char *file, const char *func, int line, s
|
|||
} \
|
||||
} \
|
||||
\
|
||||
if(_session) break; \
|
||||
if (_session) break; \
|
||||
} while(!_session)
|
||||
|
||||
|
||||
|
|
|
@ -2102,7 +2102,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
|||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_3PCC);
|
||||
}
|
||||
else if(!strcasecmp(val, "proxy")){
|
||||
else if (!strcasecmp(val, "proxy")){
|
||||
sofia_set_pflag(profile, PFLAG_3PCC_PROXY);
|
||||
}
|
||||
} else if (!strcasecmp(var, "accept-blind-auth")) {
|
||||
|
@ -4488,7 +4488,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
|||
}
|
||||
|
||||
if ((privacy = sip_privacy(sip))) {
|
||||
if(msg_params_find(privacy->priv_values, "id")) {
|
||||
if (msg_params_find(privacy->priv_values, "id")) {
|
||||
switch_set_flag(tech_pvt->caller_profile, SWITCH_CPF_HIDE_NAME | SWITCH_CPF_HIDE_NUMBER);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ void sofia_sla_handle_sip_i_notify(nua_t *nua, sofia_profile_t *profile, nua_han
|
|||
*/
|
||||
contact = switch_mprintf("sip:%s@%s",sip->sip_contact->m_url->url_user, sip->sip_contact->m_url->url_host);
|
||||
|
||||
if(sip->sip_payload && sip->sip_payload->pl_data) {
|
||||
if (sip->sip_payload && sip->sip_payload->pl_data) {
|
||||
sql = switch_mprintf("select subscriber,call_id,aor,profile_name,hostname,contact_str from sip_shared_appearance_subscriptions where "
|
||||
"aor='%q' and subscriber<>'%q' and profile_name='%q' and hostname='%q'",
|
||||
aor, contact, profile->name, mod_sofia_globals.hostname);
|
||||
|
@ -253,7 +253,7 @@ static int sofia_sla_sub_callback(void *pArg, int argc, char **argv, char **colu
|
|||
|
||||
nh = nua_handle_by_call_id(helper->profile->nua, call_id); /* that's all you need to find the subscription's nh */
|
||||
|
||||
if(nh) {
|
||||
if (nh) {
|
||||
|
||||
if (strstr(contact_str, ";fs_nat")) {
|
||||
char *p;
|
||||
|
|
|
@ -307,7 +307,7 @@ static void remove_session_elem_from_listener(listener_t *listener, session_elem
|
|||
{
|
||||
session_elem_t *s, *last = NULL;
|
||||
|
||||
if(!session)
|
||||
if (!session)
|
||||
return;
|
||||
|
||||
switch_mutex_lock(listener->session_mutex);
|
||||
|
|
|
@ -155,9 +155,9 @@ static switch_status_t my_on_routing(switch_core_session_t *session)
|
|||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if(channel) {
|
||||
if (channel) {
|
||||
const char *disable_flag = switch_channel_get_variable(channel, "disable_radius_start");
|
||||
if(switch_true(disable_flag)) {
|
||||
if (switch_true(disable_flag)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Not Sending RADIUS Start\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -396,9 +396,9 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
|
|||
}
|
||||
|
||||
|
||||
if(channel) {
|
||||
if (channel) {
|
||||
const char *disable_flag = switch_channel_get_variable(channel, "disable_radius_stop");
|
||||
if(switch_true(disable_flag)) {
|
||||
if (switch_true(disable_flag)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[mod_radius_cdr] Not Sending RADIUS Stop\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -287,13 +287,13 @@ static switch_status_t do_config(void)
|
|||
}
|
||||
} else if (!strcmp(var, "module-directory") && !switch_strlen_zero(val)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "lua: appending module directory: '%s'\n", val);
|
||||
if(cpath_stream.data_len) {
|
||||
if (cpath_stream.data_len) {
|
||||
cpath_stream.write_function(&cpath_stream, ";");
|
||||
}
|
||||
cpath_stream.write_function(&cpath_stream, "%s", val);
|
||||
} else if (!strcmp(var, "script-directory") && !switch_strlen_zero(val)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "lua: appending script directory: '%s'\n", val);
|
||||
if(path_stream.data_len) {
|
||||
if (path_stream.data_len) {
|
||||
path_stream.write_function(&path_stream, ";");
|
||||
}
|
||||
path_stream.write_function(&path_stream, "%s", val);
|
||||
|
|
|
@ -113,7 +113,7 @@ switch_status_t setMonoDirs()
|
|||
}
|
||||
}
|
||||
|
||||
if(!found)
|
||||
if (!found)
|
||||
{ // Check registry
|
||||
DWORD size = MAX_PATH;
|
||||
if (ERROR_SUCCESS == RegGetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Novell\\Mono\\2.0", "FrameworkAssemblyDirectory", RRF_RT_REG_SZ, NULL, &libPath, &size)) {
|
||||
|
|
|
@ -186,7 +186,7 @@ static switch_status_t do_config(void) {
|
|||
char *n = (char *) switch_xml_attr_soft(tran, "name");
|
||||
char *m = (char *) switch_xml_attr_soft(tran, "mapfrom");
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, " adding map %s => %s\n", m , n);
|
||||
if(!strncasecmp("id",n,strlen(n))) {
|
||||
if (!strncasecmp("id",n,strlen(n))) {
|
||||
attr_list->type = LDAP_EXTEN_ID;
|
||||
attr_list->len = strlen(m);
|
||||
attr_list->val = strdup(m);
|
||||
|
@ -530,9 +530,9 @@ static switch_xml_t xml_ldap_search(const char *section, const char *tag_name, c
|
|||
|
||||
|
||||
|
||||
if( (ldap_initialize(&ld,binding->url)) != LDAP_SUCCESS ) goto cleanup;
|
||||
if( (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &desired_version)) != LDAP_SUCCESS ) goto cleanup;
|
||||
if( (ldap_bind_s(ld, binding->binddn, binding->bindpass, auth_method)) != LDAP_SUCCESS ) goto cleanup;
|
||||
if ( (ldap_initialize(&ld,binding->url)) != LDAP_SUCCESS ) goto cleanup;
|
||||
if ( (ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &desired_version)) != LDAP_SUCCESS ) goto cleanup;
|
||||
if ( (ldap_bind_s(ld, binding->binddn, binding->bindpass, auth_method)) != LDAP_SUCCESS ) goto cleanup;
|
||||
|
||||
switch (binding->bt) {
|
||||
case XML_LDAP_CONFIG:
|
||||
|
@ -564,7 +564,7 @@ static switch_xml_t xml_ldap_search(const char *section, const char *tag_name, c
|
|||
printf("providing:\n%s\n", buf);
|
||||
switch_safe_free(buf);
|
||||
|
||||
if(ret != SWITCH_STATUS_SUCCESS) {
|
||||
if (ret != SWITCH_STATUS_SUCCESS) {
|
||||
switch_xml_free(xml);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -1779,7 +1779,7 @@ static void *SWITCH_THREAD_FUNC speech_thread(switch_thread_t *thread, void *obj
|
|||
|
||||
switch_thread_cond_wait(sth->cond, sth->mutex);
|
||||
|
||||
if(switch_test_flag(sth->ah, SWITCH_ASR_FLAG_CLOSED))
|
||||
if (switch_test_flag(sth->ah, SWITCH_ASR_FLAG_CLOSED))
|
||||
break;
|
||||
|
||||
if (switch_core_asr_check_results(sth->ah, &flags) == SWITCH_STATUS_SUCCESS) {
|
||||
|
|
Loading…
Reference in New Issue