| 851 | }; |
| 852 | |
| 853 | const char *acl_xml_update(ACL_XML *xml, const char *data) |
| 854 | { |
| 855 | if (data == NULL) |
| 856 | return ""; |
| 857 | else if (*data == 0) |
| 858 | return data; |
| 859 | |
| 860 | if (!(xml->flag & ACL_XML_FLAG_MULTI_ROOT) && xml->root_cnt > 0) |
| 861 | return data; |
| 862 | |
| 863 | /* XML ������״̬��ѭ���������� */ |
| 864 | |
| 865 | while (*data) { |
| 866 | if (xml->curr_node == NULL) { |
| 867 | if (!(xml->flag & ACL_XML_FLAG_MULTI_ROOT) |
| 868 | && xml->root_cnt > 0) |
| 869 | { |
| 870 | break; |
| 871 | } |
| 872 | |
| 873 | SKIP_SPACE(data); |
| 874 | if (*data == 0) |
| 875 | break; |
| 876 | xml->curr_node = acl_xml_node_alloc(xml); |
| 877 | acl_xml_node_add_child(xml->root, xml->curr_node); |
| 878 | xml->curr_node->depth = xml->root->depth + 1; |
| 879 | if (xml->curr_node->depth > xml->depth) |
| 880 | xml->depth = xml->curr_node->depth; |
| 881 | } |
| 882 | data = status_tab[xml->curr_node->status].callback(xml, data); |
| 883 | } |
| 884 | |
| 885 | return data; |
| 886 | } |
no test coverage detected
searching dependent graphs…