update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5118 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
a5417cc133
commit
4dab016887
|
@ -340,7 +340,7 @@ static void set_function(switch_core_session_t *session, char *data)
|
|||
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 @@ static void export_function(switch_core_session_t *session, char *data)
|
|||
}
|
||||
|
||||
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 @@ static void export_function(switch_core_session_t *session, char *data)
|
|||
} 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ LOCAL_CFLAGS += -I$(SOFIAUA_DIR)/tport -I$(SOFIAUA_DIR)/url
|
|||
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
|
||||
|
||||
|
|
|
@ -282,7 +282,11 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue