Skip to content

Commit 3de85c6

Browse files
committed
Fix nameaddr.param without index
Closes #3040
1 parent 354d42d commit 3de85c6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

transformations.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,7 +2472,7 @@ int tr_eval_nameaddr(struct sip_msg *msg, tr_param_t *tp, int subtype,
24722472
}
24732473

24742474
/* check if there is an index set */
2475-
if (tp && (tp->type != TR_NA_PARAM || tp->next)) {
2475+
if (tp && (subtype != TR_NA_PARAM || tp->next)) {
24762476
/* we do have an index */
24772477
switch (tp->type) {
24782478
case TR_PARAM_NUMBER:
@@ -2489,8 +2489,7 @@ int tr_eval_nameaddr(struct sip_msg *msg, tr_param_t *tp, int subtype,
24892489
index = v.ri;
24902490
break;
24912491
default:
2492-
LM_ERR("invalid index type: %d; integer expected\n",
2493-
tp->type);
2492+
LM_ERR("unsupported index type: %d\n", tp->type);
24942493
goto error;
24952494
}
24962495
tp = tp->next;

0 commit comments

Comments
 (0)