]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
merge MODAPP-50 (modified for changes in api)
authorMichael Jerris <mike@jerris.com>
Tue, 20 Nov 2007 03:44:19 +0000 (03:44 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 20 Nov 2007 03:44:19 +0000 (03:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6353 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_dptools/mod_dptools.c
src/mod/applications/mod_rss/mod_rss.c

index 877e313745fdbe053e8a4ced411802a2fd04d462..596bcdcbf5f21472de842d5e28f625fe8b4fe8a9 100644 (file)
@@ -3127,7 +3127,7 @@ static switch_status_t conf_api_sub_bgdial(conference_obj_t * conference, switch
 static switch_status_t conf_api_sub_transfer(conference_obj_t * conference, switch_stream_handle_t *stream, int argc, char **argv)
 {
        switch_status_t ret_status = SWITCH_STATUS_SUCCESS;
-       char *params = NULL;
+       char *params = NULL, *chanvars = NULL;
        assert(conference != NULL);
        assert(stream != NULL);
 
@@ -3170,8 +3170,9 @@ static switch_status_t conf_api_sub_transfer(conference_obj_t * conference, swit
                                        profile_name = "default";
                                }
                                params = switch_mprintf("conf_name=%s&profile_name=%s", conf_name, profile_name);
+                               chanvars = switch_channel_build_param_string(channel, NULL, params);
                                /* Open the config from the xml registry  */
-                               if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, params))) {
+                               if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, chanvars))) {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
                                        goto done;
                                }
@@ -3243,6 +3244,8 @@ static switch_status_t conf_api_sub_transfer(conference_obj_t * conference, swit
 
   done:
        switch_safe_free(params);
+       switch_safe_free(chanvars);
+
        return ret_status;
 }
 
index 5f853e71538a2a3d658a3aa9adf4f212a54371c9..cce49404f38a8671258b3ada5fdff65086f7410f 100644 (file)
@@ -853,13 +853,14 @@ static switch_ivr_action_t menu_handler(switch_ivr_menu_t * menu, char *param, c
 SWITCH_STANDARD_APP(ivr_application_function)
 {
        switch_channel_t *channel = switch_core_session_get_channel(session);
-       char *params;
+       char *params,*chanvars;
 
        if (channel && data && (params = switch_core_session_strdup(session, data))) {
                switch_xml_t cxml = NULL, cfg = NULL, xml_menus = NULL, xml_menu = NULL;
 
                // Open the config from the xml registry
-               if ((cxml = switch_xml_open_cfg(ivr_cf_name, &cfg, NULL)) != NULL) {
+               chanvars = switch_channel_build_param_string(channel, NULL, NULL);
+               if ((cxml = switch_xml_open_cfg(ivr_cf_name, &cfg, chanvars)) != NULL) {
                        if ((xml_menus = switch_xml_child(cfg, "menus"))) {
                                xml_menu = switch_xml_find_child(xml_menus, "menu", "name", params);
 
@@ -890,6 +891,7 @@ SWITCH_STANDARD_APP(ivr_application_function)
                } else {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", ivr_cf_name);
                }
+               switch_safe_free(chanvars);
        }
 }
 
index b7e7863e415c5a1e6bd797f6f96d9a38ef556c68..28e302fdcd3235e82e8cf42f3f6dd81cf63bcd3a 100644 (file)
@@ -186,6 +186,7 @@ SWITCH_STANDARD_APP(rss_function)
        uint32_t matches = 0;
        switch_input_args_t args = { 0 };
        const char *vcf = NULL;
+       char *chanvars = NULL;
 
        channel = switch_core_session_get_channel(session);
        assert(channel != NULL);
@@ -194,10 +195,12 @@ SWITCH_STANDARD_APP(rss_function)
                cf = vcf;
        }
 
+    chanvars = switch_channel_build_param_string(channel, NULL, NULL);
        if (!(cxml = switch_xml_open_cfg(cf, &cfg, NULL))) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
                return;
        }
+       switch_safe_free(chanvars);
 
        if ((feeds = switch_xml_child(cfg, "feeds"))) {
                for (feed = switch_xml_child(feeds, "feed"); feed; feed = feed->next) {