mod_measure_stanza_counts: Fix a crash in mod_bosh.

Mon, 09 Oct 2017 19:22:39 +0100

author
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date
Mon, 09 Oct 2017 19:22:39 +0100
changeset 2788
512405077709
parent 2787
750572f6f59d
child 2789
37ae0801f925

mod_measure_stanza_counts: Fix a crash in mod_bosh.

mod_measure_stanza_counts/mod_measure_stanza_counts.lua file | annotate | diff | comparison | revisions
--- a/mod_measure_stanza_counts/mod_measure_stanza_counts.lua	Mon Oct 09 20:15:33 2017 +0200
+++ b/mod_measure_stanza_counts/mod_measure_stanza_counts.lua	Mon Oct 09 19:22:39 2017 +0100
@@ -8,7 +8,7 @@
 	return function (stanza, session)
 		measures[dir]();
 		measures[dir .. "_" .. session.type]();
-		if not stanza.attr.xmlns and stanza_kinds[stanza.name] then
+		if stanza.attr and not stanza.attr.xmlns and stanza_kinds[stanza.name] then
 			measures[dir .. "_" .. session.type .. "_" .. stanza.name]();
 		end
 		return stanza;

mercurial