[Telepathy-commits] [telepathy-gabble/master] Set the tube state to open only when the SOCKS5 connection is ready

Marco Barisione marco at barisione.org
Tue Jan 6 08:41:30 PST 2009


---
 src/bytestream-factory.c |    3 ---
 src/bytestream-socks5.c  |    1 +
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index f1d1fa9..9671321 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -1027,9 +1027,6 @@ handle_socks5_query_iq (GabbleBytestreamFactory *self,
       child_node = child_node->next;
     }
 
-  g_object_set (bytestream, "state", GABBLE_BYTESTREAM_STATE_OPEN,
-      NULL);
-
   gabble_bytestream_socks5_connect_to_streamhost (bytestream, msg);
 
   return TRUE;
diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c
index 4cbd053..6907de7 100644
--- a/src/bytestream-socks5.c
+++ b/src/bytestream-socks5.c
@@ -691,6 +691,7 @@ socks5_handle_received_data (GabbleBytestreamSocks5 *self,
           }
 
         priv->socks5_state = SOCKS5_STATE_CONNECTED;
+        g_object_set (self, "state", GABBLE_BYTESTREAM_STATE_OPEN, NULL);
 
         /* Acknowledge the connection */
         iq_result = lm_iq_message_make_result (
-- 
1.5.6.5




More information about the Telepathy-commits mailing list