Diff

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
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;