Software /
code /
prosody-modules
Comparison
mod_measure_stanza_counts/mod_measure_stanza_counts.lua @ 2788:512405077709
mod_measure_stanza_counts: Fix a crash in mod_bosh.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 09 Oct 2017 19:22:39 +0100 |
parent | 2787:750572f6f59d |
child | 4559:33b1b6ff23d8 |
comparison
equal
deleted
inserted
replaced
2787:750572f6f59d | 2788:512405077709 |
---|---|
6 | 6 |
7 local function rate(measures, dir) | 7 local function rate(measures, dir) |
8 return function (stanza, session) | 8 return function (stanza, session) |
9 measures[dir](); | 9 measures[dir](); |
10 measures[dir .. "_" .. session.type](); | 10 measures[dir .. "_" .. session.type](); |
11 if not stanza.attr.xmlns and stanza_kinds[stanza.name] then | 11 if stanza.attr and not stanza.attr.xmlns and stanza_kinds[stanza.name] then |
12 measures[dir .. "_" .. session.type .. "_" .. stanza.name](); | 12 measures[dir .. "_" .. session.type .. "_" .. stanza.name](); |
13 end | 13 end |
14 return stanza; | 14 return stanza; |
15 end | 15 end |
16 end | 16 end |