25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Update http_bind module to latest XEP-0124 and XEP-0206

Only cosmetic changes, version bumped to 1.10 and added
'restartlogic' attribute.
This commit is contained in:
Janusz Dziemidowicz 2011-09-14 23:36:30 +02:00 committed by Badlop
parent a435c4b123
commit 1dc1795f2a

View File

@ -95,7 +95,7 @@
-define(FSMOPTS, []). -define(FSMOPTS, []).
-endif. -endif.
-define(BOSH_VERSION_b, <<"1.8">>). -define(BOSH_VERSION_b, <<"1.10">>).
-define(MAX_REQUESTS, 2). % number of simultaneous requests -define(MAX_REQUESTS, 2). % number of simultaneous requests
-define(MIN_POLLING, 2000000). % don't poll faster than that or we will -define(MIN_POLLING, 2000000). % don't poll faster than that or we will
@ -1049,7 +1049,8 @@ prepare_outpacket_response(#http_bind{id=Sid, wait=Wait,
BOSH_attribs = BOSH_attribs =
[#xmlattr{name = <<"authid">>, value = list_to_binary(AuthID)}, [#xmlattr{name = <<"authid">>, value = list_to_binary(AuthID)},
#xmlattr{name = <<"xmlns:stream">>, value = ?NS_XMPP_b}] ++ #xmlattr{name = <<"xmlns:stream">>, value = ?NS_XMPP_b}] ++
[#xmlattr{name = <<"version">>, ns = ?NS_BOSH_s, value = list_to_binary(Version)}], [#xmlattr{name = <<"version">>, ns = ?NS_BOSH_s, value = list_to_binary(Version)},
#xmlattr{name = <<"restartlogic">>, ns = ?NS_BOSH_s, value = <<"true">>}],
MaxInactivity = get_max_inactivity(To, ?MAX_INACTIVITY), MaxInactivity = get_max_inactivity(To, ?MAX_INACTIVITY),
MaxPause = get_max_pause(To), MaxPause = get_max_pause(To),
{200, ?HEADER, {200, ?HEADER,