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

Function tm_branch_flag_parse_name

modules/tm/tm.c:2491–2508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2489#define BR_TYPE_ID 10
2490
2491static int tm_branch_flag_parse_name(pv_spec_p sp, const str *in)
2492{
2493 unsigned int idx;
2494 if (sp==NULL || in==NULL || in->s==NULL || in->len==0)
2495 return -1;
2496
2497 if ( (idx=fixup_flag(FLAG_TYPE_BRANCH, in))==NAMED_FLAG_ERROR) {
2498 LM_ERR("failed to fix the flag <%.*s>\n",in->len,in->s);
2499 return -1;
2500 }
2501
2502 sp->pvp.pvn.type = PV_NAME_INTSTR;
2503 sp->pvp.pvn.u.isname.type = 0;
2504
2505 sp->pvp.pvn.u.isname.name.n = idx;
2506
2507 return 0;
2508}
2509
2510
2511# define BRANCH_IDX_ACTIVE_MASK (1<<16)

Callers

nothing calls this directly

Calls 1

fixup_flagFunction · 0.85

Tested by

no test coverage detected