Mercurial > prosody-modules
changeset 2514:d47a7e6e9adc
mod_storage_xmlarchive: Raise error instead of warning if there's ever more than one stanza in a chunk (this indicates some kind of corruption)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 20 Feb 2017 01:47:44 +0100 |
parents | 66a61f48e376 |
children | 4cb549622862 |
files | mod_storage_xmlarchive/mod_storage_xmlarchive.lua |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Mon Feb 20 00:09:45 2017 +0100 +++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Mon Feb 20 01:47:44 2017 +0100 @@ -83,9 +83,7 @@ local result; local function cb(_, stanza) - if result then - module:log("warn", "Multiple items in chunk"); - end + assert(not result, "Multiple items in chunk"); result = stanza; end