[Freeswitch-trunk] [commit] r12439 - freeswitch/trunk/src/mod/applications/mod_lcr

FreeSWITCH SVN brian at freeswitch.org
Wed Mar 4 20:08:31 PST 2009


Author: brian
Date: Wed Mar  4 22:08:31 2009
New Revision: 12439

Log:
damn OCD

Modified:
   freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c

Modified: freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c	Wed Mar  4 22:08:31 2009
@@ -326,14 +326,14 @@
 	switch_channel_t *channel;
 	
 	/* first replace %s with digits to maintain backward compat */
-	if(cb_struct->profile->custom_sql_has_percent == SWITCH_TRUE) {
+	if (cb_struct->profile->custom_sql_has_percent == SWITCH_TRUE) {
 		tmpSQL = switch_string_replace(custom_sql, "%q", digits);
 		newSQL = tmpSQL;
 	}
 	
 	/* expand the vars */
-	if(cb_struct->profile->custom_sql_has_vars == SWITCH_TRUE) {
-		if(cb_struct->session) {
+	if (cb_struct->profile->custom_sql_has_vars == SWITCH_TRUE) {
+		if (cb_struct->session) {
 			channel = switch_core_session_get_channel(cb_struct->session);
 			switch_assert(channel);
 			/*
@@ -349,11 +349,11 @@
 		}
 	}
 	
-	if(tmpSQL != newSQL) {
+	if (tmpSQL != newSQL) {
 		switch_safe_free(tmpSQL);
 	}
 	
-	if(newSQL == NULL) {
+	if (newSQL == NULL) {
 		return (char *) custom_sql;
 	} else {
 		return newSQL;
@@ -519,8 +519,8 @@
 	digits_expanded = expand_digits(cb_struct->pool, digits_copy);
 	
 	/* set some channel vars if we have a session */
-	if(cb_struct->session) {
-		if((channel = switch_core_session_get_channel(cb_struct->session))) {
+	if (cb_struct->session) {
+		if ((channel = switch_core_session_get_channel(cb_struct->session))) {
 			switch_channel_set_variable_var_check(channel, "lcr_query_digits", digits_copy, SWITCH_FALSE);
 			id_str = switch_core_sprintf(cb_struct->pool, "%d", cb_struct->profile->id);
 			switch_channel_set_variable_var_check(channel, "lcr_query_profile", id_str, SWITCH_FALSE);
@@ -555,11 +555,11 @@
 
 		/* format the custom_sql */
 		safe_sql = format_custom_sql(profile->custom_sql, cb_struct, digits_copy);
-		if(!safe_sql) {
+		if (!safe_sql) {
 			return SWITCH_STATUS_GENERR;
 		}
 		sql_stream.write_function(&sql_stream, safe_sql);
-		if(safe_sql != profile->custom_sql) {
+		if (safe_sql != profile->custom_sql) {
 			/* channel_expand_variables returned the same string to us, no need to free */
 			switch_safe_free(safe_sql);
 		}
@@ -727,10 +727,10 @@
 				}
 				
 				if (!switch_strlen_zero(custom_sql)) {
-					if(switch_string_var_check_const(custom_sql)) {
+					if (switch_string_var_check_const(custom_sql)) {
 						profile->custom_sql_has_vars = SWITCH_TRUE;
 					}
-					if(strstr(custom_sql, "%")) {
+					if (strstr(custom_sql, "%")) {
 						profile->custom_sql_has_percent = SWITCH_TRUE;
 					}
 					profile->custom_sql = switch_core_strdup(globals.pool, (char *)custom_sql);



More information about the Freeswitch-trunk mailing list