MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / pv_set_ruri_port

Function pv_set_ruri_port

pvar.c:3532–3556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3530
3531
3532static 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
3559static int pv_set_msg_branch(struct sip_msg* msg, pv_param_t *param,

Callers

nothing calls this directly

Calls 2

int2strFunction · 0.85
rewrite_ruriFunction · 0.85

Tested by

no test coverage detected