Make queries on daap.songalbumid:0 a no-op

Remote makes queries with daap.songalbumid:0, which doesn't make sense. Make
that a no-op.
This commit is contained in:
Julien BLACHE 2010-01-27 18:31:13 +01:00
parent 21098d4c89
commit 4321cffc87

View File

@ -107,6 +107,15 @@ expr returns [ pANTLR3_STRING result, int valid ]
/* NOTE: the lexer delivers the string without quotes /* NOTE: the lexer delivers the string without quotes
which may not be obvious from the grammar due to embedded code which may not be obvious from the grammar due to embedded code
*/ */
/* Make daap.songalbumid:0 a no-op */
if (strcmp((char *)str->chars, "daap.songalbumid:0") == 0)
{
$result->append8($result, "1 = 1");
goto STR_out;
}
field = str->chars; field = str->chars;
val = field; val = field;
@ -304,5 +313,8 @@ expr returns [ pANTLR3_STRING result, int valid ]
if (escaped) if (escaped)
free(escaped); free(escaped);
STR_out: /* get out of here */
;
} }
; ;