[OpenSIPS-Devel] [opensips] [drouting] Testing roules through MI now posssible (#293)

Răzvan Crainea notifications at github.com
Mon Aug 11 09:14:47 CEST 2014


> +    unsigned int i;
> +    static const str gw_str = str_init("GATEWAY");
> +    static const str carrier_str = str_init("CARRIER");
> +    str chosen_desc;
> +    str chosen_id;
> +    for (i = 0; i < route->pgwa_len; ++i){
> +        if (route->pgwl[i].is_carrier) {
> +            chosen_desc = carrier_str;
> +            chosen_id = route->pgwl[i].dst.carrier->id;
> +        }
> +        else {
> +            chosen_desc = gw_str;
> +            chosen_id = route->pgwl[i].dst.gw->id;
> +        }
> +
> +        if (add_mi_node_child(&rpl_tree->node, MI_IS_ARRAY, chosen_desc.s,

The MI_IS_ARRAY flag is used to indicate that a node has multiple children. Therefore I think the flag should be set on the rpl_tree->node, not on the child.



---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/293/files#r16039912
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20140811/72b3f3e0/attachment.htm>


More information about the Devel mailing list