From 8a89b1737f4ee671c6802aed610fb57c5a8e529d Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 16 Jun 2009 17:45:16 +0000 Subject: [PATCH] Store version as float (thanks to Stefan Strigler) SVN Revision: 2219 --- src/web/ejabberd_http_bind.erl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/web/ejabberd_http_bind.erl b/src/web/ejabberd_http_bind.erl index 7eb10b3f6..f5decd27b 100644 --- a/src/web/ejabberd_http_bind.erl +++ b/src/web/ejabberd_http_bind.erl @@ -3,12 +3,12 @@ %%% Author : Stefan Strigler %%% Purpose : HTTP Binding support (JEP-0124) %%% Created : 21 Sep 2005 by Stefan Strigler -%%% Id : $Id: ejabberd_http_bind.erl 274 2007-08-15 13:54:05Z sstrigler $ +%%% Id : $Id: ejabberd_http_bind.erl 275 2007-08-15 13:57:51Z sstrigler $ %%%---------------------------------------------------------------------- -module(ejabberd_http_bind). -author('steve@zeank.in-berlin.de'). --vsn('$Rev: 274 $'). +-vsn('$Rev: 275 $'). -behaviour(gen_fsm). @@ -154,7 +154,11 @@ process_request(Data) -> CHold end end, - Version = xml:get_attr_s("ver", Attrs), + Version = + case list_to_float(xml:get_attr_s("ver", Attrs)) of + {'EXIT', _} -> 0.0; + V -> V + end, XmppVersion = xml:get_attr_s("xmpp:version", Attrs), mnesia:transaction( fun() ->