diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-04-19 16:49:42 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-04-21 10:36:04 +0800 |
commit | 5fc44ac8edcdf5702a0793217f9275bd00748932 (patch) | |
tree | 8c5d7bc64a6dcdece70c587008c94f32b14de16c | |
parent | 70b302881d10a0b0ac52ef656729a1793a11d28c (diff) | |
download | gsoc2013-empathy-5fc44ac8edcdf5702a0793217f9275bd00748932.tar gsoc2013-empathy-5fc44ac8edcdf5702a0793217f9275bd00748932.tar.gz gsoc2013-empathy-5fc44ac8edcdf5702a0793217f9275bd00748932.tar.bz2 gsoc2013-empathy-5fc44ac8edcdf5702a0793217f9275bd00748932.tar.lz gsoc2013-empathy-5fc44ac8edcdf5702a0793217f9275bd00748932.tar.xz gsoc2013-empathy-5fc44ac8edcdf5702a0793217f9275bd00748932.tar.zst gsoc2013-empathy-5fc44ac8edcdf5702a0793217f9275bd00748932.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.
-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, |