[Freeswitch-svn] [commit] r12001 - in freeswitch/trunk/src: . mod/endpoints/mod_sofia mod/event_handlers/mod_erlang_event mod/event_handlers/mod_radius_cdr mod/languages/mod_lua mod/languages/mod_mono mod/xml_int/mod_xml_ldap

FreeSWITCH SVN brian at freeswitch.org
Fri Feb 13 14:27:06 PST 2009


Author: brian
Date: Fri Feb 13 16:27:05 2009
New Revision: 12001

Log:
 fixing if's to be correct

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

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	Fri Feb 13 16:27:05 2009
@@ -761,7 +761,7 @@
 			}															\
 		}																\
 																		\
-		if(_session) break;												\
+		if (_session) break;											\
 	} while(!_session)
 
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Fri Feb 13 16:27:05 2009
@@ -2102,7 +2102,7 @@
 						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 @@
 		}
 
 		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);
 			}
 		}

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c	Fri Feb 13 16:27:05 2009
@@ -220,7 +220,7 @@
 	 */
 	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 @@
 
 	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;

Modified: freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c	Fri Feb 13 16:27:05 2009
@@ -307,7 +307,7 @@
 {
 	session_elem_t *s, *last = NULL;
 	
-	if(!session)
+	if (!session)
 		return;
 
 	switch_mutex_lock(listener->session_mutex);

Modified: freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_radius_cdr/mod_radius_cdr.c	Fri Feb 13 16:27:05 2009
@@ -155,9 +155,9 @@
 		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 @@
 	}
 
 
-	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;
 		}

Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua.cpp	Fri Feb 13 16:27:05 2009
@@ -287,13 +287,13 @@
 				}
 			} 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);

Modified: freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_mono/mod_mono.cpp	Fri Feb 13 16:27:05 2009
@@ -113,7 +113,7 @@
 		}
 	}
 
-	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)) {

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_ldap/mod_xml_ldapv2.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_ldap/mod_xml_ldapv2.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_ldap/mod_xml_ldapv2.c	Fri Feb 13 16:27:05 2009
@@ -186,7 +186,7 @@
 				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 @@
 
 
 
-    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 @@
     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;
 	}

Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c	(original)
+++ freeswitch/trunk/src/switch_ivr_async.c	Fri Feb 13 16:27:05 2009
@@ -1779,7 +1779,7 @@
 
 		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) {



More information about the Freeswitch-svn mailing list