]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fixing if's to be correct
authorBrian West <brian@freeswitch.org>
Fri, 13 Feb 2009 22:27:05 +0000 (22:27 +0000)
committerBrian West <brian@freeswitch.org>
Fri, 13 Feb 2009 22:27:05 +0000 (22:27 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12001 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_sla.c
src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c
src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c
src/mod/languages/mod_lua/mod_lua.cpp
src/mod/languages/mod_mono/mod_mono.cpp
src/mod/xml_int/mod_xml_ldap/mod_xml_ldapv2.c
src/switch_ivr_async.c

index 8967a7bad8808c548affc4a5dd1be7ad112412be..f7a9db52f1530f47263228e6a5554f651f4f3279 100644 (file)
@@ -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)
 
 
index ca7230c267239ba2adf46037577da547389c639b..1f019bac280646100df48ea929d33e1e4c3de103 100644 (file)
@@ -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);
                        }
                }
index 274e2f51abdbe27fd8005c32858df8f932a76c08..16d004a9252ace4f79023b95b8f031070e2fb273 100644 (file)
@@ -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;
index f9b27716d40572bd7200f9c4cf2da94b2d074682..c06d157cd1522e89bb795444ee8c0e6a6914a739 100644 (file)
@@ -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);
index 371249e2e86c450c4e0a70ccd2e2327b5274c2be..bb8e74eaeed4c745bf1d7792cc7fd5426d7e3ed2 100644 (file)
@@ -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;
                }
index 8c555b057519e6e4e2119aef8b3f582d26753f60..839c7d8f0a926af159c0ccde95ff60ac72736046 100644 (file)
@@ -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);
index 9fbb2985906ad1703fd242f846817a8df070d22b..349a9122505dcbe7193441b5d845737e4f55fe79 100644 (file)
@@ -113,7 +113,7 @@ switch_status_t setMonoDirs()
                }\r
        }\r
 \r
-       if(!found) \r
+       if (!found) \r
        {   // Check registry\r
                DWORD size = MAX_PATH;\r
                if (ERROR_SUCCESS == RegGetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Novell\\Mono\\2.0", "FrameworkAssemblyDirectory", RRF_RT_REG_SZ, NULL, &libPath, &size)) {\r
index 413227f92e510ef7104a7cc3d3670c5faa69e86c..b597442fa8cb4aa43ff7b60c6f718415ada56f3e 100644 (file)
@@ -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;
        }
index 06eee2fb78a14acd0da0ae192ecdbc5ef2fd08bf..8b57a6c9ed3ab8f9ce152a381900a5ed5de5b0b1 100644 (file)
@@ -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) {