your run-of-the mill nightmarish attempt at normalizing not one crazy protocol but many....

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3151 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-10-22 04:37:19 +00:00
1 parent 1bc0db0db6
commit aba9c77c35
5 files changed
+253 -33

No files matched your search

@@ -3341,7 +3341,6 @@ static conference_obj_t *conference_new(char *name, switch_xml_t profile, switch
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_xml_t cfg, xml, param, ads;
memset(&globals, 0, sizeof(globals));
@@ -3359,28 +3358,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
return SWITCH_STATUS_TERM;
}
if ((xml = switch_xml_open_cfg(global_cf_name, &cfg, NULL))) {
if ((ads = switch_xml_child(cfg, "advertise"))) {
switch_event_t *event;
for (param = switch_xml_child(ads, "room"); param; param = param->next) {
char *status = (char *) switch_xml_attr_soft(param, "status");
char *name = (char *) switch_xml_attr_soft(param, "name");
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", CONF_CHAT_PROTO);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", name);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", name);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", status ? status : "Inactive");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "idle");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "event_type", "presence");
switch_event_fire(&event);
}
}
}
}
/* Setup a hash to store conferences by name */
switch_core_hash_init(&globals.conference_hash, globals.conference_pool);