diff options
Diffstat (limited to 'src/salut-tubes-channel.c')
-rw-r--r-- | src/salut-tubes-channel.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c index 7665e5fd..b64e3e73 100644 --- a/src/salut-tubes-channel.c +++ b/src/salut-tubes-channel.c @@ -36,6 +36,7 @@ #include <gibber/gibber-bytestream-muc.h> #include <gibber/gibber-xmpp-stanza.h> #include <gibber/gibber-namespaces.h> +#include <gibber/gibber-xmpp-error.h> #define DEBUG_FLAG DEBUG_TUBES #include "debug.h" @@ -2043,25 +2044,21 @@ salut_tubes_channel_bytestream_offered (SalutTubesChannel *self, tmp = gibber_xmpp_node_get_attribute (stream_node, "tube"); if (tmp == NULL) { - /* - GError e = { GABBLE_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST, + GError e = { GIBBER_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST, "<stream> or <muc-stream> has no tube attribute" }; - NODE_DEBUG (stream_node, e.message); - gabble_bytestream_iface_close (bytestream, &e); - */ + DEBUG ("%s", e.message); + gibber_bytestream_iface_close (bytestream, &e); return; } tube_id_tmp = strtoul (tmp, &endptr, 10); if (!endptr || *endptr || tube_id_tmp > G_MAXUINT32) { - /* - GError e = { GABBLE_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST, + GError e = { GIBBER_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST, "<stream> or <muc-stream> tube attribute not numeric or > 2**32" }; DEBUG ("tube id is not numeric or > 2**32: %s", tmp); - gabble_bytestream_iface_close (bytestream, &e); - */ + gibber_bytestream_iface_close (bytestream, &e); return; } tube_id = (guint) tube_id_tmp; @@ -2069,14 +2066,12 @@ salut_tubes_channel_bytestream_offered (SalutTubesChannel *self, tube = g_hash_table_lookup (priv->tubes, GUINT_TO_POINTER (tube_id)); if (tube == NULL) { - /* - GError e = { GABBLE_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST, + GError e = { GIBBER_XMPP_ERROR, XMPP_ERROR_BAD_REQUEST, "<stream> or <muc-stream> tube attribute points to a nonexistent " "tube" }; DEBUG ("tube %u doesn't exist", tube_id); - gabble_bytestream_iface_close (bytestream, &e); - */ + gibber_bytestream_iface_close (bytestream, &e); return; } |