zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #03970
[Branch ~zeitgeist/zeitgeist/bluebird] Rev 229: GetEvents: make sure event_ids[] isn't empty
------------------------------------------------------------
revno: 229
committer: Siegfried-Angel Gevatter Pujals <siegfried@xxxxxxxxxxxx>
branch nick: bluebird
timestamp: Mon 2011-09-05 21:02:23 +0200
message:
GetEvents: make sure event_ids[] isn't empty
modified:
src/engine.vala
--
lp:~zeitgeist/zeitgeist/bluebird
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird
Your team Zeitgeist Framework Team is subscribed to branch lp:~zeitgeist/zeitgeist/bluebird.
To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'src/engine.vala'
--- src/engine.vala 2011-09-05 16:16:36 +0000
+++ src/engine.vala 2011-09-05 19:02:23 +0000
@@ -76,6 +76,8 @@
Sqlite.Statement stmt;
int rc;
+ if (event_ids.length == 0)
+ return new GenericArray<Event?> ();
var sql_event_ids = database.get_sql_string_from_event_ids (event_ids);
string sql = """
SELECT * FROM event_view
@@ -699,6 +701,7 @@
}
public TimeRange? delete_events (uint32[] event_ids, BusName? sender)
+ requires (event_ids.length > 0)
{
event_ids = extension_collection.call_pre_delete_events (
event_ids, sender);