[telepathy-gabble/master] Remove error-setting macros from transports

Will Thompson will.thompson at collabora.co.uk
Sat Jun 27 04:28:03 PDT 2009


---
 src/jingle-transport-iceudp.c |    7 ++-----
 src/jingle-transport-rawudp.c |    7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/src/jingle-transport-iceudp.c b/src/jingle-transport-iceudp.c
index d51771a..d7ce043 100644
--- a/src/jingle-transport-iceudp.c
+++ b/src/jingle-transport-iceudp.c
@@ -228,10 +228,6 @@ gabble_jingle_transport_iceudp_class_init (GabbleJingleTransportIceUdpClass *cls
 
 }
 
-#define SET_BAD_REQ(txt...) g_set_error (error, GABBLE_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST, txt)
-#define SET_OUT_ORDER(txt...) g_set_error (error, GABBLE_XMPP_ERROR, XMPP_ERROR_JINGLE_OUT_OF_ORDER, txt)
-#define SET_CONFLICT(txt...) g_set_error (error, GABBLE_XMPP_ERROR, XMPP_ERROR_CONFLICT, txt)
-
 static void
 parse_candidates (GabbleJingleTransportIface *obj,
     LmMessageNode *transport_node, GError **error)
@@ -349,7 +345,8 @@ parse_candidates (GabbleJingleTransportIface *obj,
       g_free (dump);
       /* rollback these */
       jingle_transport_free_candidates (candidates);
-      SET_BAD_REQ ("invalid candidate");
+      g_set_error (error, GABBLE_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST,
+          "invalid candidate");
       return;
     }
 
diff --git a/src/jingle-transport-rawudp.c b/src/jingle-transport-rawudp.c
index d37d56b..0cb1e01 100644
--- a/src/jingle-transport-rawudp.c
+++ b/src/jingle-transport-rawudp.c
@@ -221,10 +221,6 @@ gabble_jingle_transport_rawudp_class_init (GabbleJingleTransportRawUdpClass *cls
 
 }
 
-#define SET_BAD_REQ(txt...) g_set_error (error, GABBLE_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST, txt)
-#define SET_OUT_ORDER(txt...) g_set_error (error, GABBLE_XMPP_ERROR, XMPP_ERROR_JINGLE_OUT_OF_ORDER, txt)
-#define SET_CONFLICT(txt...) g_set_error (error, GABBLE_XMPP_ERROR, XMPP_ERROR_CONFLICT, txt)
-
 static void
 parse_candidates (GabbleJingleTransportIface *obj,
     LmMessageNode *transport_node, GError **error)
@@ -292,7 +288,8 @@ parse_candidates (GabbleJingleTransportIface *obj,
       DEBUG ("not all nodes were processed, reporting error");
       /* rollback these */
       jingle_transport_free_candidates (candidates);
-      SET_BAD_REQ ("invalid candidate");
+      g_set_error (error, GABBLE_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST,
+          "invalid candidate");
       return;
     }
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list