summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-11 12:56:29 +0100
committerXavier Claessens <xavier.claessens@collabora.com>2014-04-14 14:30:27 -0400
commit89d8011a8441d36d69d5131975b9c9eedb39373a (patch)
tree1747172a7d37161cde6c15e2c21e610fce652a6e
parent213a5dc81421958f231ca030cadf394be20fe713 (diff)
tp_base_connection_change_status: emit status-changed before StatusChanged
Gabble's regression tests expect to receive PresencesChanged before StatusChanged, and PresencesChanged is triggered by the status-changed GObject signal.
-rw-r--r--telepathy-glib/base-connection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 2e85e64d0..7c02a7c13 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -1939,9 +1939,12 @@ tp_base_connection_change_status (TpBaseConnection *self,
DEBUG("emitting status-changed to %u, for reason %u", status, reason);
_tp_gdbus_connection_set_status (self->priv->connection_skeleton, status);
+ /* Emit status-changed before sending the D-Bus signal, because in practice
+ * that's what happened in telepathy-glib 0.x, as demonstrated by Gabble's
+ * regression tests failing otherwise. */
+ g_signal_emit (self, signals[STATUS_CHANGED], 0, status, reason);
_tp_gdbus_connection_emit_status_changed (self->priv->connection_skeleton,
status, reason);
- g_signal_emit (self, signals[STATUS_CHANGED], 0, status, reason);
/* tell subclass about the state change. In the case of
* disconnection, shut down afterwards */