[Telepathy-commits] [telepathy-salut/master] tube-stream: not initiated tube are always in the not-offered state

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Mar 11 09:15:23 PDT 2009


---
 src/tube-stream.c |   34 +++++++++-------------------------
 1 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/src/tube-stream.c b/src/tube-stream.c
index 239f0ab..b5ecbc3 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1331,33 +1331,17 @@ salut_tube_stream_constructor (GType type,
       ((TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT);
   tp_handle_ref (contact_repo, priv->initiator);
 
-  /* Set initial state of the tube */
   if (priv->initiator == priv->self_handle)
-    {
-      /* We initiated this tube */
-      if (priv->handle_type == TP_HANDLE_TYPE_CONTACT)
-        {
-          /* Private tube */
-          if (priv->offered)
-            {
-              priv->state = SALUT_TUBE_CHANNEL_STATE_REMOTE_PENDING;
-              priv->offer_needed = TRUE;
-            }
-          else
-            {
-              priv->state = SALUT_TUBE_CHANNEL_STATE_NOT_OFFERED;
-            }
-        }
-      else
-        {
-          /* Muc tube */
-          priv->state = SALUT_TUBE_CHANNEL_STATE_OPEN;
-        }
-    }
+  {
+    /* We initiated this tube */
+    priv->state = SALUT_TUBE_CHANNEL_STATE_NOT_OFFERED;
+    /* FIXME: we should probably remove this offer_needed */
+    priv->offer_needed = TRUE;
+  }
   else
-    {
-      priv->state = SALUT_TUBE_CHANNEL_STATE_LOCAL_PENDING;
-    }
+  {
+    priv->state = SALUT_TUBE_CHANNEL_STATE_LOCAL_PENDING;
+  }
 
   if (priv->handle_type == TP_HANDLE_TYPE_CONTACT)
     {
-- 
1.5.6.5




More information about the telepathy-commits mailing list