]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 10 May 2007 14:11:26 +0000 (14:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 10 May 2007 14:11:26 +0000 (14:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5118 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c
src/mod/endpoints/mod_sofia/Makefile
src/switch_core_session.c

index 6619243c41d5deca9c3f79eb67915722d92ffbcf..a0910cfbe07a82a23a6655dde7737ca2b79bc7ae 100644 (file)
@@ -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);
                }
        }
index 79517d58c6e1e1ec838fda12913bcee8100a633b..b21827a94c252f55c751df9a2156d0f0e4f9b05c 100644 (file)
@@ -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
 
index ce83cb3b6503299f716924cd9b408989653a2538..bfe675c74e3b180bf06e48a76cbd5dee1ce12c75 100644 (file)
@@ -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);
                                                }
                                        }
                                }