Software / code / prosody
Comparison
plugins/mod_bosh.lua @ 13460:a688947fab1e
mod_bosh: Set base_type on session
This fixes a traceback with mod_saslauth. Ideally we move this to util.session
at some point, though.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 17 Mar 2024 10:10:24 +0000 |
| parent | 13293:ad1ed84fdf13 |
| child | 13720:c3c4281c1339 |
comparison
equal
deleted
inserted
replaced
| 13459:790f60c0843b | 13460:a688947fab1e |
|---|---|
| 323 | 323 |
| 324 -- New session | 324 -- New session |
| 325 sid = new_uuid(); | 325 sid = new_uuid(); |
| 326 -- TODO use util.session | 326 -- TODO use util.session |
| 327 local session = { | 327 local session = { |
| 328 type = "c2s_unauthed", conn = request.conn, sid = sid, host = attr.to, | 328 base_type = "c2s", type = "c2s_unauthed", conn = request.conn, sid = sid, host = attr.to, |
| 329 rid = rid - 1, -- Hack for initial session setup, "previous" rid was $current_request - 1 | 329 rid = rid - 1, -- Hack for initial session setup, "previous" rid was $current_request - 1 |
| 330 bosh_version = attr.ver, bosh_wait = wait, streamid = sid, | 330 bosh_version = attr.ver, bosh_wait = wait, streamid = sid, |
| 331 bosh_max_inactive = bosh_max_inactivity, bosh_responses = cache.new(BOSH_HOLD+1):table(); | 331 bosh_max_inactive = bosh_max_inactivity, bosh_responses = cache.new(BOSH_HOLD+1):table(); |
| 332 requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, | 332 requests = { }, send_buffer = {}, reset_stream = bosh_reset_stream, |
| 333 close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true, | 333 close = bosh_close_stream, dispatch_stanza = core_process_stanza, notopen = true, |