# HG changeset patch # User Matthew Wild # Date 1343779433 -3600 # Node ID 0382f456ac82b56a18270a8864cc5201eaf710db # Parent 4bf6bd22ad119bca6f764eadf3473e9fe4a6fb42 mod_bosh: Remove redundant code (send stream features in only one place) (thanks Zash) diff -r 4bf6bd22ad11 -r 0382f456ac82 plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Wed Aug 01 00:39:54 2012 +0100 +++ b/plugins/mod_bosh.lua Wed Aug 01 01:03:53 2012 +0100 @@ -246,7 +246,7 @@ bosh_version = attr.ver, bosh_wait = attr.wait, streamid = sid, bosh_hold = BOSH_DEFAULT_HOLD, bosh_max_inactive = BOSH_DEFAULT_INACTIVITY, requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, - close = bosh_close_stream, dispatch_stanza = core_process_stanza, + close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true, log = logger.init("bosh"..sid), secure = consider_bosh_secure or request.secure, ip = get_ip_from_request(request); }; @@ -257,10 +257,6 @@ -- Send creation response local creating_session = true; - local features = st.stanza("stream:features"); - hosts[session.host].events.fire_event("stream-features", { origin = session, features = features }); - fire_event("stream-features", session, features); - table.insert(session.send_buffer, tostring(features)); local r = session.requests; function session.send(s)