Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 1047:8c2d88cda1dd
mod_bosh: Fix nil indexing when client connects to unknown host
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 23 Apr 2009 03:25:11 +0100 |
parent | 947:84202314ab7f |
child | 1048:45fc590539cd |
comparison
equal
deleted
inserted
replaced
1046:6fef969ff307 | 1047:8c2d88cda1dd |
---|---|
100 end | 100 end |
101 | 101 |
102 | 102 |
103 local function bosh_reset_stream(session) session.notopen = true; end | 103 local function bosh_reset_stream(session) session.notopen = true; end |
104 | 104 |
105 local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }) }; | 105 local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }), attr = {} }; |
106 local function bosh_close_stream(session, reason) | 106 local function bosh_close_stream(session, reason) |
107 (session.log or log)("info", "BOSH client disconnected"); | 107 (session.log or log)("info", "BOSH client disconnected"); |
108 session_close_reply.attr.condition = reason; | 108 session_close_reply.attr.condition = reason; |
109 local session_close_reply = tostring(session_close_reply); | 109 local session_close_reply = tostring(session_close_reply); |
110 for _, held_request in ipairs(session.requests) do | 110 for _, held_request in ipairs(session.requests) do |