]> granicus.if.org Git - ejabberd/commitdiff
Use NS_XBOSH instead of NS_BOSH (thanks to Janusz Dziemidowicz)
authorBadlop <badlop@process-one.net>
Thu, 15 Sep 2011 23:14:29 +0000 (01:14 +0200)
committerBadlop <badlop@process-one.net>
Thu, 15 Sep 2011 23:17:26 +0000 (01:17 +0200)
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.

src/web/ejabberd_http_bind.erl

index 7f27f1ad7ecbab7355329e250d5ab3d7d3188978..12d1c2b61f49690e96dcef7849d3afb55af4cce1 100644 (file)
@@ -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,