mod_measure_stanza_counts/mod_measure_stanza_counts.lua
changeset 2792 512405077709
parent 2791 750572f6f59d
child 4563 33b1b6ff23d8
equal deleted inserted replaced
2791:750572f6f59d 2792: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