From 743dbbf992bf7fbd7e1179e32a4c6c172433af18 Mon Sep 17 00:00:00 2001 From: Christopher Rienzo Date: Fri, 6 Jan 2012 02:05:20 +0000 Subject: [PATCH] fix do_config for and --- src/mod/applications/mod_httapi/mod_httapi.c | 24 ++++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index 5b59665962..96514d61f4 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -1480,22 +1480,26 @@ static switch_status_t do_config(void) profile->perms.dial.enabled = 1; if ((tag = switch_xml_child(profile_tag, "conference"))) { - char *var = (char *) switch_xml_attr_soft(tag, "name"); - char *val = (char *) switch_xml_attr_soft(tag, "value"); + for (param = switch_xml_child(tag, "param"); param; param = param->next) { + char *var = (char *) switch_xml_attr_soft(param, "name"); + char *val = (char *) switch_xml_attr_soft(param, "value"); - if (!strcasecmp(var, "default-profile")) { - profile->conference_params.use_profile = switch_core_strdup(globals.pool, val); + if (!strcasecmp(var, "default-profile")) { + profile->conference_params.use_profile = switch_core_strdup(globals.pool, val); + } } } if ((tag = switch_xml_child(profile_tag, "dial"))) { - char *var = (char *) switch_xml_attr_soft(tag, "name"); - char *val = (char *) switch_xml_attr_soft(tag, "value"); + for (param = switch_xml_child(tag, "param"); param; param = param->next) { + char *var = (char *) switch_xml_attr_soft(param, "name"); + char *val = (char *) switch_xml_attr_soft(param, "value"); - if (!strcasecmp(var, "context")) { - profile->dial_params.context = switch_core_strdup(globals.pool, val); - } else if (!strcasecmp(var, "dialplan")) { - profile->dial_params.dp = switch_core_strdup(globals.pool, val);; + if (!strcasecmp(var, "context")) { + profile->dial_params.context = switch_core_strdup(globals.pool, val); + } else if (!strcasecmp(var, "dialplan")) { + profile->dial_params.dp = switch_core_strdup(globals.pool, val); + } } }