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

Function msg_flag_parse_name

pvar.c:4260–4277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4258/************** MSG FLAGS function *****************/
4259
4260static int msg_flag_parse_name(pv_spec_p sp, const str *in)
4261{
4262 unsigned int idx;
4263 if (sp==NULL || in==NULL || in->s==NULL || in->len==0)
4264 return -1;
4265
4266 if ( (idx=fixup_flag(FLAG_TYPE_MSG, in))==NAMED_FLAG_ERROR) {
4267 LM_ERR("failed to fix the flag <%.*s>\n",in->len,in->s);
4268 return -1;
4269 }
4270
4271 sp->pvp.pvn.type = PV_NAME_INTSTR;
4272 sp->pvp.pvn.u.isname.type = 0;
4273
4274 sp->pvp.pvn.u.isname.name.n = idx;
4275
4276 return 0;
4277}
4278
4279
4280static int msg_flag_set(struct sip_msg* msg, pv_param_t *param, int op,

Callers

nothing calls this directly

Calls 1

fixup_flagFunction · 0.85

Tested by

no test coverage detected