changeset 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
parents 750572f6f59d
children 37ae0801f925
files mod_measure_stanza_counts/mod_measure_stanza_counts.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;