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

Function msg_branch_flag_parse_name

pvar.c:4361–4378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4359/************** BRANCH FLAGS function *****************/
4360
4361static int msg_branch_flag_parse_name(pv_spec_p sp, const str *in)
4362{
4363 unsigned int idx;
4364 if (sp==NULL || in==NULL || in->s==NULL || in->len==0)
4365 return -1;
4366
4367 if ( (idx=fixup_flag(FLAG_TYPE_BRANCH, in))==NAMED_FLAG_ERROR) {
4368 LM_ERR("failed to fix the flag <%.*s>\n",in->len,in->s);
4369 return -1;
4370 }
4371
4372 sp->pvp.pvn.type = PV_NAME_INTSTR;
4373 sp->pvp.pvn.u.isname.type = 0;
4374
4375 sp->pvp.pvn.u.isname.name.n = idx;
4376
4377 return 0;
4378}
4379
4380
4381static int msg_branch_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