From e61dc0318e7a7c00c268105599ea3eada2c1491b Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Mon, 7 Nov 2011 21:45:02 +1100 Subject: [PATCH] Return the appropriate value in the case of an unknown timestamp This updates Gabble for the latest spec. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=42652 --- lib/ext/wocky | 2 +- src/muc-channel.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ext/wocky b/lib/ext/wocky index 1f29491..43a7bf1 160000 --- a/lib/ext/wocky +++ b/lib/ext/wocky @@ -1 +1 @@ -Subproject commit 1f2949120297e4ac2b3abbbe916a8f9b34f702ce +Subproject commit 43a7bf14e609bba43158ceb6892afb37a2106424 diff --git a/src/muc-channel.c b/src/muc-channel.c index 2e3225f..09666cd 100644 --- a/src/muc-channel.c +++ b/src/muc-channel.c @@ -455,7 +455,7 @@ gabble_muc_channel_constructed (GObject *obj) priv->subject = NULL; priv->subject_actor = NULL; - priv->subject_timestamp = 0; + priv->subject_timestamp = G_MAXINT64; /* fd.o#13157: The subject is currently assumed to be modifiable by everyone * in the room (role >= VISITOR). When that bug is fixed, it will be: */ /* Modifiable via special s, if the user's role is high enough; @@ -2521,7 +2521,8 @@ _gabble_muc_channel_handle_subject (GabbleMucChannel *chan, GabbleMucChannelPrivate *priv; const gchar *actor; GError *error = NULL; - gint64 timestamp = g_date_time_to_unix (datetime); + gint64 timestamp = datetime != NULL ? + g_date_time_to_unix (datetime) : G_MAXINT64; g_assert (GABBLE_IS_MUC_CHANNEL (chan)); @@ -2601,7 +2602,7 @@ _gabble_muc_channel_receive (GabbleMucChannel *chan, gboolean is_echo; gboolean is_error; gchar *tmp; - gint64 timestamp = g_date_time_to_unix (datetime); + gint64 timestamp = datetime != NULL ? g_date_time_to_unix (datetime): 0; g_assert (GABBLE_IS_MUC_CHANNEL (chan)); -- 1.7.5.4