From: Badlop Date: Thu, 15 Sep 2011 23:14:29 +0000 (+0200) Subject: Use NS_XBOSH instead of NS_BOSH (thanks to Janusz Dziemidowicz) X-Git-Tag: v3.0.0-alpha-4~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b45ee520889e52ef656655e09c1704a236eabb2;p=ejabberd Use NS_XBOSH instead of NS_BOSH (thanks to Janusz Dziemidowicz) There are two, exactly the same defines for urn:xmpp:xbosh namespace: NS_BOSH and NS_XBOSH. Both are used in http_bind module. Stick with NS_XBOSH everywhere. --- diff --git a/src/web/ejabberd_http_bind.erl b/src/web/ejabberd_http_bind.erl index 7f27f1ad7..12d1c2b61 100644 --- a/src/web/ejabberd_http_bind.erl +++ b/src/web/ejabberd_http_bind.erl @@ -232,7 +232,7 @@ process_request(Data, IP) -> %% Existing session {ok, {Sid, Rid, Attrs, Payload1}} -> StreamStart = - case exmpp_xml:get_attribute_from_list_as_list(Attrs, ?NS_BOSH, <<"restart">>, "") of + case exmpp_xml:get_attribute_from_list_as_list(Attrs, ?NS_XBOSH, <<"restart">>, "") of "true" -> true; _ -> @@ -303,7 +303,7 @@ handle_session_start(Pid, XmppDomain, Sid, Rid, Attrs, {'EXIT', _} -> 0.0; V -> V end, - XmppVersion = exmpp_xml:get_attribute_from_list_as_list(Attrs, ?NS_BOSH, <<"version">>, ""), + XmppVersion = exmpp_xml:get_attribute_from_list_as_list(Attrs, ?NS_XBOSH, <<"version">>, ""), ?DEBUG("Create session: ~p", [Sid]), mnesia:async_dirty( fun() -> @@ -1049,8 +1049,8 @@ prepare_outpacket_response(#http_bind{id=Sid, wait=Wait, BOSH_attribs = [#xmlattr{name = <<"authid">>, value = list_to_binary(AuthID)}, #xmlattr{name = <<"xmlns:stream">>, value = ?NS_XMPP_b}] ++ - [#xmlattr{name = <<"version">>, ns = ?NS_BOSH_s, value = list_to_binary(Version)}, - #xmlattr{name = <<"restartlogic">>, ns = ?NS_BOSH_s, value = <<"true">>}], + [#xmlattr{name = <<"version">>, ns = ?NS_XBOSH_s, value = list_to_binary(Version)}, + #xmlattr{name = <<"restartlogic">>, ns = ?NS_XBOSH_s, value = <<"true">>}], MaxInactivity = get_max_inactivity(To, ?MAX_INACTIVITY), MaxPause = get_max_pause(To), {200, ?HEADER,