diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-12-16 15:42:27 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-12-16 16:18:59 +0100 |
commit | fdf36f4291a6c08604fd676ebf205bc7ac5ef26e (patch) | |
tree | 9fef5db1a2b3008797a408492450092be3213b9a | |
parent | 8e88018c188a2cef571150ef9fb1b484c16979b7 (diff) |
replace retrieving_pending by got_initial_messages
-rw-r--r-- | telepathy-glib/text-channel.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/telepathy-glib/text-channel.c b/telepathy-glib/text-channel.c index 16f5c6f89..68a5f94ef 100644 --- a/telepathy-glib/text-channel.c +++ b/telepathy-glib/text-channel.c @@ -78,7 +78,7 @@ struct _TpTextChannelPrivate /* queue of owned TpSignalledMessage */ GQueue *pending_messages; - gboolean retrieving_pending; + gboolean got_initial_messages; }; enum @@ -423,7 +423,7 @@ message_received_cb (TpChannel *proxy, /* If we are still retrieving pending messages, no need to add the message, * it will be in the initial set of messages retrieved. */ - if (self->priv->retrieving_pending) + if (!self->priv->got_initial_messages) return; DEBUG ("New message received"); @@ -646,7 +646,7 @@ get_pending_messages_cb (TpProxy *proxy, GList *parts_list = NULL; GPtrArray *sender_ids; - self->priv->retrieving_pending = FALSE; + self->priv->got_initial_messages = TRUE; if (error != NULL) { @@ -747,7 +747,6 @@ get_pending_messages_cb (TpProxy *proxy, static void tp_text_channel_prepare_pending_messages (TpProxy *proxy) { - TpTextChannel *self = (TpTextChannel *) proxy; TpChannel *channel = (TpChannel *) proxy; GError *error = NULL; @@ -769,8 +768,6 @@ tp_text_channel_prepare_pending_messages (TpProxy *proxy) goto fail; } - self->priv->retrieving_pending = TRUE; - tp_cli_dbus_properties_call_get (proxy, -1, TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "PendingMessages", get_pending_messages_cb, proxy, NULL, G_OBJECT (proxy)); |