From: Jens Georg Date: Wed, 25 Aug 2010 18:15:45 +0000 (+0300) Subject: media-export: Fix UPnP "exists" search X-Git-Tag: RYGEL_0_7_7~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d88825464d530355fd2391866f181c6bdfef0d0a;p=profile%2Fivi%2Frygel.git media-export: Fix UPnP "exists" search --- diff --git a/src/plugins/media-export/rygel-media-export-media-cache.vala b/src/plugins/media-export/rygel-media-export-media-cache.vala index b1aec0f..688f749 100644 --- a/src/plugins/media-export/rygel-media-export-media-cache.vala +++ b/src/plugins/media-export/rygel-media-export-media-cache.vala @@ -738,12 +738,12 @@ public class Rygel.MediaExport.MediaCache : Object { case SearchCriteriaOp.EXISTS: string sql_function; if (exp.operand2 == "true") { - sql_function = "IS NOT NULL AND %s != ''"; + sql_function = "%s IS NOT NULL AND %s != ''"; } else { - sql_function = "IS NULL OR %s = ''"; + sql_function = "%s IS NULL OR %s = ''"; } - operator = new SqlOperator (sql_function, column); - break; + + return sql_function.printf (column, column); case SearchCriteriaOp.EQ: case SearchCriteriaOp.NEQ: case SearchCriteriaOp.LESS: