diff -r d7a086201a6e -r f340460a8b5d dav/scfg.c --- a/dav/scfg.c Tue Jun 12 11:14:16 2018 +0200 +++ b/dav/scfg.c Wed Jun 13 16:57:56 2018 +0200 @@ -96,7 +96,7 @@ xmlNode *node, UcxList **include, UcxList **exclude, - SyncTagFilter **tagfilter) + UcxList **tags) { node = node->children; @@ -113,9 +113,9 @@ } } else if(xstreq(node->name, "tags")) { if(value) { - *tagfilter = parse_tagfilter_string( + SyncTagFilter *tagfilter = parse_tagfilter_string( value, DAV_SYNC_TAGFILTER_SCOPE_RESOURCE); - if(!*tagfilter) { + if(!tagfilter) { print_error( node->line, "malformed tag filter: %s\n", @@ -127,18 +127,23 @@ if(scope) { if(xstreq(scope, "resource")) { - (*tagfilter)->scope = + tagfilter->scope = DAV_SYNC_TAGFILTER_SCOPE_RESOURCE; } else if(xstreq(scope, "collection")) { - (*tagfilter)->scope = + tagfilter->scope = DAV_SYNC_TAGFILTER_SCOPE_COLLECTION; } else if(xstreq(scope, "all")) { - (*tagfilter)->scope = + tagfilter->scope = DAV_SYNC_TAGFILTER_SCOPE_RESOURCE | DAV_SYNC_TAGFILTER_SCOPE_COLLECTION; + } else { + tagfilter->scope = + DAV_SYNC_TAGFILTER_SCOPE_RESOURCE; } } xmlFree(scope); + + *tags = ucx_list_append(*tags, tagfilter); } } } else { @@ -257,7 +262,7 @@ TagConfig *tagconfig = NULL; UcxList *include = NULL; UcxList *exclude = NULL; - SyncTagFilter *tagfilter = NULL; + UcxList *tagfilter = NULL; int max_retry = 0; int allow_cmd = SYNC_CMD_PULL | SYNC_CMD_PUSH | SYNC_CMD_ARCHIVE; bool backuppull = false;