zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #04085
[Branch ~zeitgeist/zeitgeist/bluebird] Rev 249: fix payload insertion by referfing to the dat in the byte array
------------------------------------------------------------
revno: 249
committer: Seif Lotfy <seif@xxxxxxxxx>
branch nick: bluebird
timestamp: Sat 2011-09-17 01:45:36 +0200
message:
fix payload insertion by referfing to the dat in the byte array
added FIXME to check if extension is disabled
modified:
src/engine.vala
src/extension-collection.vala
test/dbus/engine-test.py
--
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-16 22:43:03 +0000
+++ src/engine.vala 2011-09-16 23:45:36 +0000
@@ -1109,12 +1109,10 @@
if (event.payload != null)
{
int rc;
- //unowned string foo = (string) event.payload.data;
- //stdout.printf("%s\n", foo);
unowned Sqlite.Statement payload_insertion_stmt =
database.payload_insertion_stmt;
payload_insertion_stmt.reset();
- payload_insertion_stmt.bind_blob(1, event.payload,
+ payload_insertion_stmt.bind_blob(1, event.payload.data,
event.payload.data.length);
if ((rc = payload_insertion_stmt.step()) != Sqlite.DONE)
if (rc != Sqlite.CONSTRAINT)
=== modified file 'src/extension-collection.vala'
--- src/extension-collection.vala 2011-09-16 14:49:01 +0000
+++ src/extension-collection.vala 2011-09-16 23:45:36 +0000
@@ -80,6 +80,7 @@
string path = Path.build_filename (ext_dir1, file_name);
debug ("Loading extension: \"%s\"", path);
var loader = new ModuleLoader (path);
+ // FIXME: check if disabled
extension = loader.create_instance (engine);
if (extension != null) extensions.add (extension);
}
=== modified file 'test/dbus/engine-test.py'
--- test/dbus/engine-test.py 2011-09-01 17:01:30 +0000
+++ test/dbus/engine-test.py 2011-09-16 23:45:36 +0000
@@ -486,9 +486,11 @@
ev.payload = sampleString.encode("UTF-8")
ids = self.insertEventsAndWait([ev])
_ev = self.getEventsAndWait(ids)[0]
- self.assertEquals(ev.payload, _ev.payload) #FIXME: Are we missing payloads?
+ _ev.payload = "".join(map(str, _ev.payload)).decode('utf-8')
+ self.assertEquals(ev.payload, _ev.payload)
# Note: engine.insert_events() sets the id of the Event objects
+ ev[0][0] = _ev.id
self.assertEquals(ev, _ev)
def testQueryByParent (self):