Skip to content

Commit

Permalink
Fix bug in evaluating the port spec in lb_count_call
Browse files Browse the repository at this point in the history
(cherry picked from commit e7319c1)
  • Loading branch information
bogdan-iancu committed Aug 5, 2016
1 parent a0736d9 commit 88c6004
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions modules/load_balancer/load_balancer.c
Expand Up @@ -761,15 +761,10 @@ static int w_lb_count_call(struct sip_msg *req, char *ip, char *port, char *grp,

/* get the port */
if (port) {
if (pv_get_spec_value( req, (pv_spec_t*)port, &val)!=0) {
if (fixup_get_ivalue( req, (gparam_p)port, &port_no)!=0) {
LM_ERR("failed to get PORT value from PV\n");
return -1;
}
if ( (val.flags&PV_VAL_INT)==0 ) {
LM_ERR("PORT PV val is not integer\n");
return -1;
}
port_no = val.ri;
} else {
port_no = 0;
}
Expand Down

0 comments on commit 88c6004

Please sign in to comment.