Commit 4d448a7d authored by W. Michael Petullo's avatar W. Michael Petullo

Fix _dmap_share_build_filter to support commas in values

Signed-off-by: W. Michael Petullo's avatarW. Michael Petullo <mike@flyn.org>
parent f1052fb0
24 October 2010 W. Michael Petullo <mike@flyn.org>
* Fix _dmap_share_build_filter to support commas in values.
23 October 2010 W. Michael Petullo <mike@flyn.org>
* Provide a configuration-time warning if libsoup < 2.32; this
......
......@@ -1245,10 +1245,18 @@ _dmap_share_build_filter (gchar *filterstr)
} else {
switch (*next_char) {
case '(':
parentheses_count++;
if (is_value) {
accept = TRUE;
} else {
parentheses_count++;
}
break;
case ')':
parentheses_count--;
if (is_value) {
accept = TRUE;
} else {
parentheses_count--;
}
break;
case '\'':
if (quotes_count > 0) {
......@@ -1258,7 +1266,7 @@ _dmap_share_build_filter (gchar *filterstr)
}
break;
case ' ':
if (quotes_count > 0) {
if (is_value) {
accept = TRUE;
} else {
new_group = TRUE;
......@@ -1274,18 +1282,26 @@ _dmap_share_build_filter (gchar *filterstr)
is_value = TRUE;
}
break;
case '!':
if (is_value) {
accept = TRUE;
} else if (is_key && value) {
negate = TRUE;
}
break;
case ',':
case '+':
// Accept these characters only if inside quotes
if (is_value) {
accept = TRUE;
}
break;
case '\0':
// Don't accept these caracters
// Never accept
break;
case '!':
if (is_key && value) {
negate = TRUE;
break;
}
default:
accept = TRUE;
break;
}
}
//g_debug ("Char: %c, Accept: %s", *next_char, accept?"TRUE":"FALSE");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment