summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-03-01 15:17:30 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-03-01 15:17:30 -0500
commitffa38e87f97e1fcc4940e45a9feff2e5e5546965 (patch)
tree631b7f4ae74121304b0842899853a4a24c703bf0
parent9edfe9dfc29a640342ea61e2ee0b2cb4bb1623d7 (diff)
Fix XML store test crash on 32bit machine
The XML store was allocating event passing native integers as timestamp property, which was causing crash on 32bit since TPL timestamp are 64bit.
-rw-r--r--tests/dbus/test-tpl-log-store-xml.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c
index 3b4b3d6..60e5c1d 100644
--- a/tests/dbus/test-tpl-log-store-xml.c
+++ b/tests/dbus/test-tpl-log-store-xml.c
@@ -287,6 +287,7 @@ test_add_text_event (XmlTestCaseFixture *fixture,
TplEvent *event;
GError *error = NULL;
GList *events;
+ gint64 timestamp = time (NULL);
account = tp_account_new (fixture->bus,
TP_ACCOUNT_OBJECT_PATH_BASE "idle/irc/me",
@@ -307,7 +308,7 @@ test_add_text_event (XmlTestCaseFixture *fixture,
"log-id", "my-log-id",
"sender", me,
"receiver", contact,
- "timestamp", time (NULL),
+ "timestamp", timestamp,
/* TplTextEvent */
"message-type", TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
"message", "my message 1",
@@ -335,7 +336,7 @@ test_add_text_event (XmlTestCaseFixture *fixture,
"log-id", "my-log-id",
"sender", contact,
"receiver", me,
- "timestamp", time (NULL),
+ "timestamp", timestamp,
/* TplTextEvent */
"message-type", TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
"message", "my message 1",
@@ -363,7 +364,7 @@ test_add_text_event (XmlTestCaseFixture *fixture,
"log-id", "my-log-id",
"sender", me,
"receiver", room,
- "timestamp", time (NULL),
+ "timestamp", timestamp,
/* TplTextEvent */
"message-type", TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
"message", "my message 1",
@@ -391,7 +392,7 @@ test_add_text_event (XmlTestCaseFixture *fixture,
"log-id", "my-log-id",
"sender", contact,
"receiver", room,
- "timestamp", time (NULL),
+ "timestamp", timestamp,
/* TplTextEvent */
"message-type", TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
"message", "my message 1",