[Freeswitch-svn] [commit] r6174 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Wed Nov 7 13:34:56 EST 2007


Author: anthm
Date: Wed Nov  7 13:34:56 2007
New Revision: 6174

Modified:
   freeswitch/trunk/src/switch_channel.c

Log:
add more nested var tricks

Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c	(original)
+++ freeswitch/trunk/src/switch_channel.c	Wed Nov  7 13:34:56 2007
@@ -1382,7 +1382,7 @@
 
 				if (vtype == 1) {
 					char *expanded = NULL;
-
+					
 					if ((expanded = switch_channel_expand_variables(channel, (char *)vname)) == vname) {
 						expanded = NULL;
 					} else {
@@ -1397,7 +1397,13 @@
 					SWITCH_STANDARD_STREAM(stream);
 
 					if (stream.data) {
-
+						char *expanded_vname = NULL;
+						
+						if ((expanded_vname = switch_channel_expand_variables(channel, (char *)vname)) == vname) {
+							expanded_vname = NULL;
+						} else {
+							vname = expanded_vname;
+						}
 
 						if ((expanded = switch_channel_expand_variables(channel, vval)) == vval) {
 							expanded = NULL;
@@ -1413,6 +1419,7 @@
 						}
 						
 						switch_safe_free(expanded);
+						switch_safe_free(expanded_vname);
 						
 					} else {
 						switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");



More information about the Freeswitch-svn mailing list