diff options
author | Danielle Madeley <danielle@madeley.id.au> | 2011-11-07 21:45:02 +1100 |
---|---|---|
committer | Danielle Madeley <danielle@madeley.id.au> | 2011-11-07 21:45:48 +1100 |
commit | e61dc0318e7a7c00c268105599ea3eada2c1491b (patch) | |
tree | 5b5ca557618fab13aa49ab8624cdc9e789c613c0 /src/muc-channel.c | |
parent | 465b3aef2330ae73c2f643eeec4676da657c2222 (diff) | |
download | telepathy-gabble-e61dc0318e7a7c00c268105599ea3eada2c1491b.tar.gz |
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
Diffstat (limited to 'src/muc-channel.c')
-rw-r--r-- | src/muc-channel.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/muc-channel.c b/src/muc-channel.c index 2e3225f0a..09666cd6a 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 <message/>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)); |