From 028a3c2ded90d2e95d3c3e75741e1522d6a1226e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 6 Oct 2008 14:56:36 +0000 Subject: [PATCH] Fix a bug where we were matching on #iq.type instead of #iq.kind, resulting in bad-request sent to the client. PR: EJABP-1 SVN Revision: 1602 --- ChangeLog | 6 ++++++ src/ejabberd_sm.erl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ef7caf102..d05c89d1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-06 Jean-Sébastien Pédron + + * src/ejabberd_sm.erl (process_iq/3): Fix a bug where we were matching + on #iq.type instead of #iq.kind, resulting in bad-request sent to the + client. + 2008-10-02 Jean-Sébastien Pédron * src/mod_roster_odbc.erl: Fix a bug where a JID represented as a diff --git a/src/ejabberd_sm.erl b/src/ejabberd_sm.erl index 2d24d17a5..4d8ea55c2 100644 --- a/src/ejabberd_sm.erl +++ b/src/ejabberd_sm.erl @@ -661,7 +661,7 @@ process_iq(From, To, Packet) -> Err = exmpp_iq:error(Packet, 'service-unavailable'), ejabberd_router:route(To, From, Err) end; - #iq{type = response} -> + #iq{kind = response} -> ok; _ -> Err = exmpp_iq:error(Packet, 'bad-request'),