diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h index 8967a7bad8..f7a9db52f1 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.h +++ b/src/mod/endpoints/mod_sofia/mod_sofia.h @@ -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) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index ca7230c267..1f019bac28 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -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); } } diff --git a/src/mod/endpoints/mod_sofia/sofia_sla.c b/src/mod/endpoints/mod_sofia/sofia_sla.c index 274e2f51ab..16d004a925 100644 --- a/src/mod/endpoints/mod_sofia/sofia_sla.c +++ b/src/mod/endpoints/mod_sofia/sofia_sla.c @@ -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; diff --git a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c index f9b27716d4..c06d157cd1 100644 --- a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c +++ b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c @@ -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); diff --git a/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c b/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c index 371249e2e8..bb8e74eaee 100644 --- a/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c +++ b/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c @@ -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; } diff --git a/src/mod/languages/mod_lua/mod_lua.cpp b/src/mod/languages/mod_lua/mod_lua.cpp index 8c555b0575..839c7d8f0a 100644 --- a/src/mod/languages/mod_lua/mod_lua.cpp +++ b/src/mod/languages/mod_lua/mod_lua.cpp @@ -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); diff --git a/src/mod/languages/mod_mono/mod_mono.cpp b/src/mod/languages/mod_mono/mod_mono.cpp index 9fbb298590..349a912250 100644 --- a/src/mod/languages/mod_mono/mod_mono.cpp +++ b/src/mod/languages/mod_mono/mod_mono.cpp @@ -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)) { diff --git a/src/mod/xml_int/mod_xml_ldap/mod_xml_ldapv2.c b/src/mod/xml_int/mod_xml_ldap/mod_xml_ldapv2.c index 413227f92e..b597442fa8 100644 --- a/src/mod/xml_int/mod_xml_ldap/mod_xml_ldapv2.c +++ b/src/mod/xml_int/mod_xml_ldap/mod_xml_ldapv2.c @@ -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; } diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 06eee2fb78..8b57a6c9ed 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -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) {