[OpenSIPS-Devel] [ opensips-Bugs-3414860 ] LB breaks when calling load_balance() w differing resources

SourceForge.net noreply at sourceforge.net
Wed Sep 28 09:01:06 CEST 2011


Bugs item #3414860, was opened at 2011-09-28 09:01
Message generated for change (Tracker Item Submitted) made by wdoekes
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3414860&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Walter Doekes (wdoekes)
Assigned to: Nobody/Anonymous (nobody)
Summary: LB breaks when calling load_balance() w differing resources

Initial Comment:
Hi,

when calling load_balance() with "resource1" and sometimes with "resource1;resource2" the call_res static array in do_load_balance is resized, and call_res_no is updated to two.

When calling get_dst_load, call_res_no is passed, instead of rl->n, so get_dst_load is always performed on 2 resources, even when only one is passed.

This can result in get_dst_load returning 0 (either with a CRITICAL error) or in some cases simply the wrong load.

See the attached one-line fix.

Regards,
Walter Doekes
OSSO B.V.

(1.7 and earlier are also affected)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3414860&group_id=232389



More information about the Devel mailing list