[Freeswitch-svn] [commit] r5118 - in freeswitch/trunk/src: . mod/applications/mod_dptools mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Thu May 10 10:11:26 EDT 2007
Author: anthm
Date: Thu May 10 10:11:26 2007
New Revision: 5118
Modified:
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile
freeswitch/trunk/src/switch_core_session.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 Thu May 10 10:11:26 2007
@@ -340,7 +340,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;
+ char *exports, *new_exports = NULL, *new_exports_d = NULL, *var, *val = NULL, *var_name = NULL;
int local = 1;
channel = switch_core_session_get_channel(session);
@@ -361,11 +361,13 @@
}
if (!strncasecmp(var, "nolocal:", 8)) {
- var += 8;
+ var_name = var + 8;
local = 0;
+ } else {
+ var_name = var;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXPORT %s[%s]=[%s]\n", local ? "" : "(REMOTE ONLY) ", var, val ? val : "UNDEF");
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXPORT %s[%s]=[%s]\n", local ? "" : "(REMOTE ONLY) ", var_name, val ? val : "UNDEF");
switch_channel_set_variable(channel, var, val);
if (var && val) {
@@ -375,9 +377,9 @@
} else {
new_exports = var;
}
- if (local) {
- switch_channel_set_variable(channel, SWITCH_EXPORT_VARS_VARIABLE, new_exports);
- }
+
+ switch_channel_set_variable(channel, SWITCH_EXPORT_VARS_VARIABLE, new_exports);
+
switch_safe_free(new_exports_d);
}
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/Makefile Thu May 10 10:11:26 2007
@@ -15,7 +15,7 @@
LOCAL_CFLAGS += `if test -f $(BASE)/.libs/libfreeswitch_la-switch_odbc.o ; then echo -DSWITCH_HAVE_ODBC; fi ;`
LOCAL_OBJS=sofia.o sofia_glue.o sofia_presence.o sofia_reg.o
-LOCAL_SOURCES=sofia.c sofia_glue.c sofia_presense.c sofia_reg.c mod_sofia.c
+LOCAL_SOURCES=sofia.c sofia_glue.c sofia_presense.c sofia_reg.c mod_sofia.c mod_sofia.h
SOFIALA=$(SOFIAUA_DIR)/libsofia-sip-ua.la
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Thu May 10 10:11:26 2007
@@ -282,7 +282,11 @@
for (x = 0; x < argc; x++) {
char *val;
if ((val = switch_channel_get_variable(channel, argv[x]))) {
- switch_channel_set_variable(peer_channel, argv[x], val);
+ char *var = argv[x];
+ if (!strncasecmp(var, "nolocal:", 8)) {
+ var += 8;
+ }
+ switch_channel_set_variable(peer_channel, var, val);
}
}
}
More information about the Freeswitch-svn
mailing list