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

Function fixup_pvname_list

modules/sqlops/sqlops.c:588–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586}
587
588static int fixup_pvname_list(void** param)
589{
590 pvname_list_t *anlist = NULL, *it;
591 str s = *(str *)*param;
592
593 if(s.s==NULL || s.s[0]==0) {
594 *param = NULL;
595 return 0;
596 }
597
598 anlist = parse_pvname_list(&s, 0/*type*/);
599 if(anlist==NULL)
600 {
601 LM_ERR("bad list of vars in [%.*s]\n", s.len, s.s);
602 return E_UNSPEC;
603 }
604
605 /* check if all vars are writeble */
606 for( it=anlist ; it ; it=it->next ) {
607 if (!pv_is_w( (&it->sname) )) {
608 LM_ERR("non-writeable var (type %d) found in [%.*s]\n",
609 it->sname.type, s.len, s.s);
610 return E_CFG;
611 }
612 }
613
614 *param = (void*)anlist;
615 return 0;
616}
617
618static int fixup_free_pvname_list(void** param)
619{

Callers

nothing calls this directly

Calls 1

parse_pvname_listFunction · 0.85

Tested by

no test coverage detected