From: Anthony Minessale Date: Wed, 9 May 2007 22:13:18 +0000 (+0000) Subject: update X-Git-Tag: v1.0-beta1~361 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5417cc133a4ec0efb4a534a92d56e8e84d4ed12;p=thirdparty%2Ffreeswitch.git update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5117 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 8448453384..6619243c41 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -341,6 +341,7 @@ static void export_function(switch_core_session_t *session, char *data) { 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 @@ static void export_function(switch_core_session_t *session, char *data) } } - 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 @@ static void export_function(switch_core_session_t *session, char *data) } 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); } }