| 586 | } |
| 587 | |
| 588 | static 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 | |
| 618 | static int fixup_free_pvname_list(void** param) |
| 619 | { |
nothing calls this directly
no test coverage detected