aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/jabber_util.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-03-21 16:17:24 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-03-21 16:17:24 +0000
commit85693e62c8e847ee0336419c3f229bb5caac29a0 (patch)
tree1e1dbba1cba752b75dcf44394f7d6a0a0b14f934 /protocols/jabber/jabber_util.c
parent81ee561d520e38535fb6947ac0e3fba808e6de4b (diff)
parent767a148faa35c18cdf4da77b5919a2f6e2df868a (diff)
Merging in killerbee stuff (just file transfers and maybe a few things from
mainline). Once I add ft support glue to protocols/purple/ I guess this will all go into killerbee.
Diffstat (limited to 'protocols/jabber/jabber_util.c')
-rw-r--r--protocols/jabber/jabber_util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c
index db5944bc..bd2fbe8c 100644
--- a/protocols/jabber/jabber_util.c
+++ b/protocols/jabber/jabber_util.c
@@ -98,7 +98,7 @@ struct xt_node *jabber_make_packet( char *name, char *type, char *to, struct xt_
return node;
}
-struct xt_node *jabber_make_error_packet( struct xt_node *orig, char *err_cond, char *err_type )
+struct xt_node *jabber_make_error_packet( struct xt_node *orig, char *err_cond, char *err_type, char *err_code )
{
struct xt_node *node, *c;
char *to;
@@ -111,6 +111,10 @@ struct xt_node *jabber_make_error_packet( struct xt_node *orig, char *err_cond,
c = xt_new_node( "error", NULL, c );
xt_add_attr( c, "type", err_type );
+ /* Add the error code, if present */
+ if (err_code)
+ xt_add_attr( c, "code", err_code );
+
/* To make the actual error packet, we copy the original packet and
add our <error>/type="error" tag. Including the original packet
is recommended, so let's just do it. */