diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-04-19 16:49:42 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-04-19 16:49:42 +0800 |
commit | e3eb2f9d11ae3cc274c9d020dca0306fde07f783 (patch) | |
tree | 23023b7a76b24ea939f6edf4353186c9f74013b9 /libempathy/empathy-message.c | |
parent | 52d369333daea849d6119f4aee80007d9c659652 (diff) | |
download | gsoc2013-empathy-e3eb2f9d11ae3cc274c9d020dca0306fde07f783.tar gsoc2013-empathy-e3eb2f9d11ae3cc274c9d020dca0306fde07f783.tar.gz gsoc2013-empathy-e3eb2f9d11ae3cc274c9d020dca0306fde07f783.tar.bz2 gsoc2013-empathy-e3eb2f9d11ae3cc274c9d020dca0306fde07f783.tar.lz gsoc2013-empathy-e3eb2f9d11ae3cc274c9d020dca0306fde07f783.tar.xz gsoc2013-empathy-e3eb2f9d11ae3cc274c9d020dca0306fde07f783.tar.zst gsoc2013-empathy-e3eb2f9d11ae3cc274c9d020dca0306fde07f783.zip |
empathy-message: cast timestamps to glong
tp_message_get_received_timestamp() and tpl_event_get_timestamp() both return
gint64 while the timestamp is stored as a glong. We need to cast it as varargs
won't do it for us and not casting will result in a a sizing mismatch on
32-bit.
Ideally we should stop using time_t and always use gint64 with timestamps.
Diffstat (limited to 'libempathy/empathy-message.c')
-rw-r--r-- | libempathy/empathy-message.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c index ad3a32c1f..883c5e7bb 100644 --- a/libempathy/empathy-message.c +++ b/libempathy/empathy-message.c @@ -324,7 +324,7 @@ empathy_message_from_tpl_log_event (TplEvent *logevent) "type", tpl_text_event_get_message_type (TPL_TEXT_EVENT (logevent)), "body", body, "is-backlog", TRUE, - "timestamp", tpl_event_get_timestamp (logevent), + "timestamp", (glong) tpl_event_get_timestamp (logevent), NULL); if (receiver != NULL) { @@ -632,7 +632,7 @@ empathy_message_new_from_tp_message (TpMessage *tp_msg, message = g_object_new (EMPATHY_TYPE_MESSAGE, "body", body, "type", tp_message_get_message_type (tp_msg), - "timestamp", tp_message_get_received_timestamp (tp_msg), + "timestamp", (glong) tp_message_get_received_timestamp (tp_msg), "flags", flags, "is-backlog", flags & TP_CHANNEL_TEXT_MESSAGE_FLAG_SCROLLBACK, "incoming", incoming, |