| 3530 | |
| 3531 | |
| 3532 | static int pv_set_ruri_port(struct sip_msg* msg, pv_param_t *param, |
| 3533 | int op, pv_value_t *val) |
| 3534 | { |
| 3535 | str sval; |
| 3536 | |
| 3537 | if(msg==NULL || param==NULL) |
| 3538 | { |
| 3539 | LM_ERR("bad parameters\n"); |
| 3540 | return -1; |
| 3541 | } |
| 3542 | |
| 3543 | if(val == NULL) |
| 3544 | sval = str_empty; |
| 3545 | else if(!(val->flags&PV_VAL_STR)) |
| 3546 | sval.s = int2str(val->ri, &sval.len); |
| 3547 | else |
| 3548 | sval = val->rs; |
| 3549 | |
| 3550 | if (rewrite_ruri(msg, &sval, 0, RW_RURI_PORT) < 0) { |
| 3551 | LM_ERR("Failed to set R-URI hostname\n"); |
| 3552 | return -1; |
| 3553 | } |
| 3554 | |
| 3555 | return 0; |
| 3556 | } |
| 3557 | |
| 3558 | |
| 3559 | static int pv_set_msg_branch(struct sip_msg* msg, pv_param_t *param, |
nothing calls this directly
no test coverage detected