trunk

changeset 5071:0382f456ac82

mod_bosh: Remove redundant code (send stream features in only one place) (thanks Zash)
author Matthew Wild <mwild1@gmail.com>
date Wed, 01 Aug 2012 01:03:53 +0100
parents 4bf6bd22ad11
children 586c9106a106
files plugins/mod_bosh.lua
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/plugins/mod_bosh.lua	Wed Aug 01 00:39:54 2012 +0100
     1.2 +++ b/plugins/mod_bosh.lua	Wed Aug 01 01:03:53 2012 +0100
     1.3 @@ -246,7 +246,7 @@
     1.4  			bosh_version = attr.ver, bosh_wait = attr.wait, streamid = sid,
     1.5  			bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY,
     1.6  			requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream,
     1.7 -			close = bosh_close_stream, dispatch_stanza = core_process_stanza,
     1.8 +			close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true,
     1.9  			log = logger.init("bosh"..sid),	secure = consider_bosh_secure or request.secure,
    1.10  			ip = get_ip_from_request(request);
    1.11  		};
    1.12 @@ -257,10 +257,6 @@
    1.13  
    1.14  		-- Send creation response
    1.15  		local creating_session = true;
    1.16 -		local features = st.stanza("stream:features");
    1.17 -		hosts[session.host].events.fire_event("stream-features", { origin = session, features = features });
    1.18 -		fire_event("stream-features", session, features);
    1.19 -		table.insert(session.send_buffer, tostring(features));
    1.20  
    1.21  		local r = session.requests;
    1.22  		function session.send(s)