[Telepathy-commits] [telepathy-gabble/master] socks5: use peer_jid and self_full_jid to compute the domain

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


We shouldn't use the to attribute of the IQ as the jabber server will
change it to our real jid if the IQ was send in the context of a muc
---
 src/bytestream-socks5.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c
index f7a98da..00d82e8 100644
--- a/src/bytestream-socks5.c
+++ b/src/bytestream-socks5.c
@@ -671,8 +671,6 @@ socks5_handle_received_data (GabbleBytestreamSocks5 *self,
   gchar msg[SOCKS5_CONNECT_LENGTH];
   guint auth_len;
   guint i;
-  const gchar *from;
-  const gchar *to;
   gchar *domain;
   LmMessage *iq_result;
   guint8 domain_len;
@@ -698,12 +696,8 @@ socks5_handle_received_data (GabbleBytestreamSocks5 *self,
 
         DEBUG ("Received auth reply. Sending CONNECT command");
 
-        from = lm_message_node_get_attribute (
-            priv->msg_for_acknowledge_connection->node, "from");
-        to = lm_message_node_get_attribute (
-            priv->msg_for_acknowledge_connection->node, "to"),
-
-        domain = compute_domain (priv->stream_id, from, to);
+        domain = compute_domain(priv->stream_id, priv->peer_jid,
+            priv->self_full_jid);
 
         msg[0] = SOCKS5_VERSION;
         msg[1] = SOCKS5_CMD_CONNECT;
-- 
1.5.6.5




More information about the telepathy-commits mailing list