From 9b251d95bf5f0a074226c0948fc59cd4ee4d460d Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Mon, 7 Nov 2011 21:25:46 +1100 Subject: [PATCH] Make unknown timestamp a G_MAXINT64 This makes idle compliant with the updated spec. --- src/idle-muc-channel.c | 10 ++++++---- src/idle-muc-channel.h | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/idle-muc-channel.c b/src/idle-muc-channel.c index 100fc26..0daa8cc 100644 --- a/src/idle-muc-channel.c +++ b/src/idle-muc-channel.c @@ -112,7 +112,7 @@ typedef struct { guint limit; gchar *topic; gchar *key; - guint topic_touched; + gint64 topic_touched; TpHandle topic_toucher; const gchar *topic_toucher_id; } IRCChannelModeState; @@ -230,6 +230,8 @@ static void idle_muc_channel_init (IdleMUCChannel *obj) { muc_channel_tp_properties_init(obj); priv->dispose_has_run = FALSE; + + priv->mode_state.topic_touched = G_MAXINT64; } static void idle_muc_channel_dispose (GObject *object); @@ -1325,7 +1327,7 @@ void idle_muc_channel_topic_touch ( IdleMUCChannel *self, const TpHandle toucher, - const guint timestamp) + const gint64 timestamp) { IdleMUCChannelPrivate *priv = self->priv; @@ -1337,7 +1339,7 @@ void idle_muc_channel_topic_full ( IdleMUCChannel *self, const TpHandle toucher, - const guint timestamp, + const gint64 timestamp, const gchar *topic) { IdleMUCChannelPrivate *priv = self->priv; @@ -1382,7 +1384,7 @@ void idle_muc_channel_topic_unset ( IdleMUCChannel *self) { - idle_muc_channel_topic_full (self, 0, 0, ""); + idle_muc_channel_topic_full (self, 0, G_MAXINT64, ""); } void idle_muc_channel_badchannelkey(IdleMUCChannel *chan) { diff --git a/src/idle-muc-channel.h b/src/idle-muc-channel.h index 33164f9..ece24a3 100644 --- a/src/idle-muc-channel.h +++ b/src/idle-muc-channel.h @@ -94,8 +94,8 @@ void idle_muc_channel_quit(IdleMUCChannel *chan, TpHandle handle, const gchar *m gboolean idle_muc_channel_receive(IdleMUCChannel *chan, TpChannelTextMessageType type, TpHandle sender, const gchar *msg); void idle_muc_channel_rename(IdleMUCChannel *chan, TpHandle old_handle, TpHandle new_handle); void idle_muc_channel_topic(IdleMUCChannel *chan, const gchar *topic); -void idle_muc_channel_topic_full(IdleMUCChannel *chan, const TpHandle handle, const guint timestamp, const gchar *topic); -void idle_muc_channel_topic_touch(IdleMUCChannel *chan, const TpHandle handle, const guint timestamp); +void idle_muc_channel_topic_full(IdleMUCChannel *chan, const TpHandle handle, const gint64 timestamp, const gchar *topic); +void idle_muc_channel_topic_touch(IdleMUCChannel *chan, const TpHandle handle, const gint64 timestamp); void idle_muc_channel_topic_unset(IdleMUCChannel *chan); gboolean idle_muc_channel_is_ready(IdleMUCChannel *chan); -- 1.7.5.4