From 816f61af4b4f73134f80a96a839f74de845f68b8 Mon Sep 17 00:00:00 2001 From: Brian West Date: Sat, 27 Dec 2008 16:56:58 +0000 Subject: [PATCH] register gateways from users after group changes. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10970 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 1468c0b78c..809d6606b0 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1184,12 +1184,18 @@ static void parse_domain_tag(sofia_profile_t *profile, switch_xml_t x_domain_tag dname, profile->name); } } - + if (switch_true(parse)) { - switch_xml_t ut, gateways_tag; - for (ut = switch_xml_child(x_domain_tag, "user"); ut; ut = ut->next) { - if (((gateways_tag = switch_xml_child(ut, "gateways")))) { - parse_gateways(profile, gateways_tag); + switch_xml_t gts, gt, uts, ut, gateways_tag; + for (gts = switch_xml_child(x_domain_tag, "groups"); gts; gts = gts->next) { + for (gt = switch_xml_child(gts, "group"); gt; gt = gt->next) { + for (uts = switch_xml_child(gt, "users"); uts; uts = uts->next) { + for (ut = switch_xml_child(uts, "user"); ut; ut = ut->next) { + if (((gateways_tag = switch_xml_child(ut, "gateways")))) { + parse_gateways(profile, gateways_tag); + } + } + } } } }