[telepathy-gabble/master] tube-dbus: check if the tube has been requested to determine if we need to offer it
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Wed Sep 9 03:28:08 PDT 2009
If we rejoin a muc containing old D-Bus tubes we previously created they
now have the "Local Pending" state as expected instead of "Not Offered".
This fix b.fd.o #23678 as such tubes are now listed in
Tubes.ListTubes().
---
src/tube-dbus.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index 00f9e8d..9db9f19 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -957,7 +957,12 @@ gabble_tube_dbus_constructor (GType type,
g_assert (priv->muc == NULL);
}
- if (priv->initiator == priv->self_handle)
+ /* Tube needs to be offered if we initiated AND requested it. Being
+ * the initiator is not enough as we could re-join a muc containing and old
+ * tube we created when we were in this room some time ago. In that case, we
+ * have to accept it if we want to re-join the tube. */
+ if (priv->initiator == priv->self_handle &&
+ priv->requested)
{
priv->offered = FALSE;
}
--
1.5.6.5
More information about the telepathy-commits
mailing list