]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make conf use default profile if none specified, make it work with soundfiles on...
authorMichael Jerris <mike@jerris.com>
Mon, 4 Sep 2006 03:36:56 +0000 (03:36 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 4 Sep 2006 03:36:56 +0000 (03:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2499 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c

index 55e753044893da6409eaedb2d6153c570d76d53a..68368d6d22f8abdf868d28ebe8a46e722b2cbdf2 100644 (file)
@@ -1017,7 +1017,11 @@ static switch_status_t conference_play_file(conference_obj_t *conference, char *
         return SWITCH_STATUS_FALSE;
     }
 
+#ifdef WIN32
+       if (file[1] != ':') {
+#else
        if (*file != '/') {
+#endif
                return conference_say(conference, file, leadin);
        }
 
@@ -2173,19 +2177,23 @@ static void conference_function(switch_core_session_t *session, char *data)
                *dpin++ = '\0';
        }
 
+       /* Open the config from the xml registry */
+       if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, NULL))) {
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
+               goto done;
+       }
+
        if ((profile_name = strchr(conf_name, '@'))) {
                *profile_name++ = '\0';
 
-               /* Open the config from the xml registry */
-               if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, NULL))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
-                       goto done;
-               }
-               
                if ((profiles = switch_xml_child(cfg, "profiles"))) {
                        profile = switch_xml_find_child(profiles, "profile", "name", profile_name);
                }
-       } 
+       } else {
+               if ((profiles = switch_xml_child(cfg, "profiles"))) {
+                       profile = switch_xml_find_child(profiles, "profile", "name", "default");
+               }
+       }
 
        if (isbr) {
                char *uuid = switch_core_session_get_uuid(session);