Mercurial > prosody-hg
comparison plugins/mod_bosh.lua @ 4327:98ae0d0b4d07
mod_bosh: Fix logging when no sid present, fix a missing semi-colon, avoid an extra useless table lookup (thanks Thomas)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 28 Jun 2011 17:00:50 +0100 |
| parents | 2478698bdc52 |
| children | 8154bc28e520 |
comparison
equal
deleted
inserted
replaced
| 4326:6c082bf9bf0f | 4327:98ae0d0b4d07 |
|---|---|
| 215 sessions[session.sid] = nil; | 215 sessions[session.sid] = nil; |
| 216 sm_destroy_session(session); | 216 sm_destroy_session(session); |
| 217 end | 217 end |
| 218 | 218 |
| 219 function stream_callbacks.streamopened(request, attr) | 219 function stream_callbacks.streamopened(request, attr) |
| 220 log("debug", "BOSH body open (sid: %s)", attr.sid); | 220 local sid = attr.sid; |
| 221 local sid = attr.sid | 221 log("debug", "BOSH body open (sid: %s)", sid or "<none>"); |
| 222 if not sid then | 222 if not sid then |
| 223 -- New session request | 223 -- New session request |
| 224 request.notopen = nil; -- Signals that we accept this opening tag | 224 request.notopen = nil; -- Signals that we accept this opening tag |
| 225 | 225 |
| 226 -- TODO: Sanity checks here (rid, to, known host, etc.) | 226 -- TODO: Sanity checks here (rid, to, known host, etc.) |
