diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-11 12:56:29 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-11 14:48:05 +0100 |
commit | 5c82dc0b3360bd612f905115ed23861df1ea3856 (patch) | |
tree | 5dfc0975a79841348696bfa048ea6155992a2274 | |
parent | 6052cfb03679442408c459cf64fe09742d59c72a (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.c | 5 |
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 */ |