[Freeswitch-branches] [commit] r3884 - freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference
Freeswitch SVN
knhor at freeswitch.org
Mon Jan 1 14:33:37 EST 2007
Author: knhor
Date: Mon Jan 1 14:33:36 2007
New Revision: 3884
Modified:
freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
Log:
instead of requiring a profile name for the conference, use the profile "default" for not specified
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c Mon Jan 1 14:33:36 2007
@@ -3094,13 +3094,12 @@
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 *profile_name = strchr(argv[0],'@');
assert(conference != NULL);
assert(stream != NULL);
/* if we have a conference name with a profile name, and at least one member to transfer */
- if (argc >= 2 && !switch_strlen_zero(argv[0]) && !switch_strlen_zero(profile_name)) {
+ if (argc >= 2 && !switch_strlen_zero(argv[0])) {
int x;
for (x = 1; x<argc; x++) {
@@ -3122,6 +3121,7 @@
switch_memory_pool_t *pool = NULL;
conf_xml_cfg_t xml_cfg = {0};
char *conf_name;
+ char *profile_name;
/* Setup a memory pool to use. */
if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
@@ -3133,13 +3133,15 @@
if ((profile_name = strchr(conf_name, '@'))) {
*profile_name++ = '\0';
+ } else {
+ profile_name = "default";
+ }
/* get the xml config sections */
if (conference_get_xml_sections(profile_name, &xml_cfg) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
goto done;
}
- }
/* Create the conference object. */
new_conference = conference_new(conf_name, &xml_cfg, pool);
@@ -3243,7 +3245,7 @@
{"say", (api_cmd_fn_t)&conf_api_sub_say, CONF_API_SUB_ARGS_AS_ONE, "<confname> say <text>"},
{"saymember", (api_cmd_fn_t)&conf_api_sub_saymember, CONF_API_SUB_ARGS_AS_ONE, "<confname> saymember <member_id> <text>"},
{"stop", (api_cmd_fn_t)&conf_api_sub_stop, CONF_API_SUB_MEMBER_TARGET, "<confname> stop <[current|all|last]> [<member_id>]"},
- {"transfer", (api_cmd_fn_t)&conf_api_sub_transfer, CONF_API_SUB_ARGS_SPLIT, "<confname> transfer <conference_name at conference_profile_name> <member id> [...<member id>]"},
+ {"transfer", (api_cmd_fn_t)&conf_api_sub_transfer, CONF_API_SUB_ARGS_SPLIT, "<confname> transfer <conference_name[@conference_profile_name]> <member id> [...<member id>]"},
{"undeaf", (api_cmd_fn_t)&conf_api_sub_undeaf, CONF_API_SUB_MEMBER_TARGET, "<confname> undeaf <[member_id|all]|last>"},
{"unlock", (api_cmd_fn_t)&conf_api_sub_unlock, CONF_API_SUB_ARGS_SPLIT, "<confname> unlock"},
{"unmute", (api_cmd_fn_t)&conf_api_sub_unmute, CONF_API_SUB_MEMBER_TARGET, "<confname> unmute <[member_id|all]|last>"},
@@ -3686,13 +3688,15 @@
/* is there profile specification ? */
if ((profile_name = strchr(conf_name, '@'))) {
*profile_name++ = '\0';
+ } else {
+ profile_name = "default";
+ }
/* get the xml config sections */
if (conference_get_xml_sections(profile_name, &xml_cfg) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
- goto done;
- }
- }
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
+ goto done;
+ }
/* if this is a bridging call, and it's not a duplicate, build a */
/* conference object, and skip pin handling, and locked checking */
More information about the Freeswitch-branches
mailing list