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

Function pv_set_value

pvar.c:5478–5502  ·  view source on GitHub ↗

function to set pv value */

Source from the content-addressed store, hash-verified

5476
5477/* function to set pv value */
5478int pv_set_value(struct sip_msg* msg, pv_spec_p sp,
5479 int op, pv_value_t *value)
5480{
5481 struct sip_msg* pv_msg;
5482
5483 if(msg==NULL || sp==NULL || sp->setf==NULL || sp->type==PVT_NONE)
5484 {
5485 LM_ERR("bad parameters\n");
5486 return -1;
5487 }
5488
5489 if(sp->pvc && sp->pvc->contextf)
5490 {
5491 pv_msg = sp->pvc->contextf(msg);
5492 if(pv_msg == NULL || pv_msg==FAKED_REPLY)
5493 {
5494 LM_DBG("Invalid %p pv context message\n",pv_msg);
5495 return -1;
5496 }
5497 }
5498 else
5499 pv_msg = msg;
5500
5501 return (*sp->setf)(pv_msg, &(sp->pvp), op, value);
5502}
5503
5504int pv_get_spec_value(struct sip_msg* msg, const pv_spec_p sp, pv_value_t *value)
5505{

Callers 15

w_pv_printfFunction · 0.85
w_cache_fetchFunction · 0.85
w_cache_counter_fetchFunction · 0.85
w_cache_addFunction · 0.85
w_cache_subFunction · 0.85
do_assignFunction · 0.85
w_stat_iter_nextFunction · 0.85
pm_hash_matchFunction · 0.85
get_source_groupFunction · 0.85
run_msrp_auth_routeFunction · 0.85
run_msrp_socket_routeFunction · 0.85
msg_set_pseudoVarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected