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

Function pv_get_spec_name

pvar.c:5367–5397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5365}
5366
5367int pv_get_spec_name(struct sip_msg* msg, pv_param_p ip, pv_value_t *name)
5368{
5369 if(msg==NULL || ip==NULL || name==NULL)
5370 return -1;
5371 memset(name, 0, sizeof(pv_value_t));
5372
5373 if(ip->pvn.type==PV_NAME_INTSTR)
5374 {
5375 if(ip->pvn.u.isname.type&AVP_NAME_STR)
5376 {
5377 name->rs = ip->pvn.u.isname.name.s;
5378 name->flags = PV_VAL_STR;
5379 } else {
5380 name->ri = ip->pvn.u.isname.name.n;
5381 name->flags = PV_VAL_INT|PV_TYPE_INT;
5382 }
5383 return 0;
5384 }
5385 /* pvar */
5386 if(pv_get_spec_value(msg, (const pv_spec_p)(ip->pvn.u.dname), name)!=0)
5387 {
5388 LM_ERR("cannot get name value\n");
5389 return -1;
5390 }
5391 if(name->flags&PV_VAL_NULL || name->flags&PV_VAL_EMPTY)
5392 {
5393 LM_ERR("null or empty name\n");
5394 return -1;
5395 }
5396 return 0;
5397}
5398
5399int pv_get_avp_name(struct sip_msg* msg, pv_param_p ip, int *avp_name,
5400 unsigned short *name_type)

Callers 11

pv_get_hdr_prologFunction · 0.85
pv_get_keepalive_socketFunction · 0.85
ops_sql_avp_loadFunction · 0.85
ops_sql_avp_deleteFunction · 0.85
ops_sql_avp_storeFunction · 0.85
pv_get_rl_countFunction · 0.85
pv_get_b2bl_peerFunction · 0.85
pv_get_config_nameFunction · 0.85
pv_get_mqkFunction · 0.85
pv_get_mqvFunction · 0.85
pv_get_mq_sizeFunction · 0.85

Calls 1

pv_get_spec_valueFunction · 0.85

Tested by

no test coverage detected