153 static TagConfig* parse_tagconfig(xmlNode *node) { |
153 static TagConfig* parse_tagconfig(xmlNode *node) { |
154 TagConfig conf; |
154 TagConfig conf; |
155 conf.store = TAG_STORE_XATTR; |
155 conf.store = TAG_STORE_XATTR; |
156 conf.local_format = TAG_FORMAT_TEXT; |
156 conf.local_format = TAG_FORMAT_TEXT; |
157 conf.server_format = TAG_FORMAT_XML; |
157 conf.server_format = TAG_FORMAT_XML; |
|
158 conf.scan = false; |
158 xmlNode *c = node->children; |
159 xmlNode *c = node->children; |
159 |
160 |
160 // TODO: error handling |
161 // TODO: error handling |
161 while(c) { |
162 while(c) { |
162 if(node->type == XML_ELEMENT_NODE) { |
163 if(c->type == XML_ELEMENT_NODE) { |
163 char *value = util_xml_get_text(c); |
164 char *value = util_xml_get_text(c); |
164 if(xstreq(c->name, "local-store")) { |
165 if(xstreq(c->name, "local-store")) { |
165 if(!value) { |
166 if(!value) { |
166 return NULL; |
167 return NULL; |
167 } else if(xstreq(value, "xattr")) { |
168 } else if(xstreq(value, "xattr")) { |