Skip to content

Commit

Permalink
htable : fix $shtrecord(value) returned value
Browse files Browse the repository at this point in the history
 $shtrecord(value) does not return correct value when it is an integer
  • Loading branch information
lazedo committed Jul 31, 2015
1 parent f231446 commit c446840
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modules/htable/ht_var.c
Expand Up @@ -393,13 +393,10 @@ int pv_get_ht_expired_cell(struct sip_msg *msg, pv_param_t *param,
strncmp(param->pvn.u.isname.name.s.s, "value", 5) == 0)
{
if(ht_expired_cell->flags&AVP_VAL_STR) {
res->rs = ht_expired_cell->value.s;
res->flags = PV_VAL_STR;
return pv_get_strval(msg, param, res, &ht_expired_cell->value.s);
} else {
res->ri = ht_expired_cell->value.n;
res->flags = PV_VAL_INT|PV_TYPE_INT;
return pv_get_sintval(msg, param, res, ht_expired_cell->value.n);
}
return 0;
}

if (res->rs.s == NULL)
Expand Down

0 comments on commit c446840

Please sign in to comment.