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

Function pv_set_dsturi_port

pvar.c:3503–3527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3501}
3502
3503static int pv_set_dsturi_port(struct sip_msg* msg, pv_param_t *param,
3504 int op, pv_value_t *val)
3505{
3506 str sval;
3507
3508 if(msg==NULL || param==NULL)
3509 {
3510 LM_ERR("bad parameters\n");
3511 return -1;
3512 }
3513
3514 if(val == NULL)
3515 sval = str_empty;
3516 else if(!(val->flags&PV_VAL_STR))
3517 sval.s = int2str(val->ri, &sval.len);
3518 else
3519 sval = val->rs;
3520
3521 if (set_dst_host_port(msg, NULL, &sval) < 0) {
3522 LM_ERR("Failed to set DST-URI port\n");
3523 return -1;
3524 }
3525
3526 return 0;
3527}
3528
3529
3530

Callers

nothing calls this directly

Calls 2

int2strFunction · 0.85
set_dst_host_portFunction · 0.85

Tested by

no test coverage detected