[Freeswitch-svn] [commit] r5117 - freeswitch/trunk/src/mod/applications/mod_dptools

Freeswitch SVN anthm at freeswitch.org
Wed May 9 18:13:18 EDT 2007


Author: anthm
Date: Wed May  9 18:13:18 2007
New Revision: 5117

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

Log:
update

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Wed May  9 18:13:18 2007
@@ -341,6 +341,7 @@
 {
 	switch_channel_t *channel;
 	char *exports, *new_exports = NULL, *new_exports_d = NULL, *var, *val = NULL;
+	int local = 1;
 
 	channel = switch_core_session_get_channel(session);
 	assert(channel != NULL);
@@ -359,7 +360,12 @@
 			}
 		}
 
-		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXPORT [%s]=[%s]\n", var, val ? val : "UNDEF");
+		if (!strncasecmp(var, "nolocal:", 8)) {
+			var += 8;
+			local = 0;
+		}
+
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXPORT %s[%s]=[%s]\n", local ? "" : "(REMOTE ONLY) ", var, val ? val : "UNDEF");
 		switch_channel_set_variable(channel, var, val);
 
 		if (var && val) {
@@ -369,7 +375,9 @@
 			} else {
 				new_exports = var;
 			}
-			switch_channel_set_variable(channel, SWITCH_EXPORT_VARS_VARIABLE, new_exports);
+			if (local) {
+				switch_channel_set_variable(channel, SWITCH_EXPORT_VARS_VARIABLE, new_exports);
+			}
 			switch_safe_free(new_exports_d);
 		}
 	}



More information about the Freeswitch-svn mailing list