[Telepathy-commits] [telepathy-gabble/master] Revert "socks5_error: always fire the connection-error signal if the state was not connected"

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue Mar 17 09:43:10 PDT 2009


This reverts commit 062154c15d44dc9b371e3060d4f3b3e71c0ed01e.

This patch is wrong. We shouldn't fire connection-error if there is
still streamhosts to try. Furthermore, the initiator should wait
for the iq error from the target before firing this signal.
---
 src/bytestream-socks5.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c
index 546dace..d430324 100644
--- a/src/bytestream-socks5.c
+++ b/src/bytestream-socks5.c
@@ -635,6 +635,8 @@ socks5_error (GabbleBytestreamSocks5 *self)
 
       DEBUG ("no more streamhosts to try");
 
+      g_signal_emit_by_name (self, "connection-error");
+
       g_assert (priv->msg_for_acknowledge_connection != NULL);
       _gabble_connection_send_iq_error (priv->conn,
           priv->msg_for_acknowledge_connection, XMPP_ERROR_ITEM_NOT_FOUND,
@@ -644,12 +646,6 @@ socks5_error (GabbleBytestreamSocks5 *self)
       priv->msg_for_acknowledge_connection = NULL;
     }
 
-  if (previous_state != SOCKS5_STATE_CONNECTED &&
-      previous_state != SOCKS5_STATE_ERROR)
-    {
-      g_signal_emit_by_name (self, "connection-error");
-    }
-
   DEBUG ("error, closing the connection\n");
 
   gabble_bytestream_socks5_close (GABBLE_BYTESTREAM_IFACE (self), NULL);
-- 
1.5.6.5




More information about the telepathy-commits mailing list