[Telepathy-commits] [telepathy-gabble/master] Pass an error message to _gabble_connection_send_iq_error() in handle_socks5_query_iq()

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


---
 src/bytestream-factory.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index 2d24360..f1d1fa9 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -984,7 +984,7 @@ handle_socks5_query_iq (GabbleBytestreamFactory *self,
     {
       DEBUG ("got a message without a from field");
       _gabble_connection_send_iq_error (priv->conn, msg,
-          XMPP_ERROR_BAD_REQUEST, NULL);
+          XMPP_ERROR_BAD_REQUEST, "SOCKS5 <query> has no 'from' attribute");
       return TRUE;
     }
 
@@ -993,7 +993,7 @@ handle_socks5_query_iq (GabbleBytestreamFactory *self,
     {
       DEBUG ("SOCKS5 query stanza doesn't contain stream id");
       _gabble_connection_send_iq_error (priv->conn, msg,
-          XMPP_ERROR_BAD_REQUEST, NULL);
+          XMPP_ERROR_BAD_REQUEST, "SOCKS5 <query> has no stream ID");
       return TRUE;
     }
 
@@ -1003,7 +1003,8 @@ handle_socks5_query_iq (GabbleBytestreamFactory *self,
       /* We don't accept streams not previously announced using SI */
       DEBUG ("unknown stream: <%s> from <%s>", bsid.stream, bsid.jid);
       _gabble_connection_send_iq_error (priv->conn, msg,
-          XMPP_ERROR_BAD_REQUEST, NULL);
+          XMPP_ERROR_ITEM_NOT_FOUND,
+          "SOCKS5 <query> has an unknown stream ID");
       return TRUE;
     }
 
@@ -1012,7 +1013,8 @@ handle_socks5_query_iq (GabbleBytestreamFactory *self,
     {
       DEBUG ("non-TCP SOCKS5 bytestreams are not supported");
       _gabble_connection_send_iq_error (priv->conn, msg,
-          XMPP_ERROR_BAD_REQUEST, NULL);
+          XMPP_ERROR_BAD_REQUEST,
+          "SOCKS5 non-TCP bytestreams are not supported");
       return TRUE;
     }
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list