Software /
code /
prosody-modules
Comparison
mod_mam/mod_mam.lua @ 1369:8be609f5610e
mod_mam, mod_mam_muc: Check that storagemanager didn't return an instance of the null storage method (Thanks Jonathan)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 23 Mar 2014 22:35:27 +0100 |
parent | 1325:b21236b6b8d8 |
child | 1399:7fb6b607afd6 |
comparison
equal
deleted
inserted
replaced
1368:5724008bbdb1 | 1369:8be609f5610e |
---|---|
32 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); | 32 local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); |
33 local global_default_policy = module:get_option("default_archive_policy", false); | 33 local global_default_policy = module:get_option("default_archive_policy", false); |
34 | 34 |
35 local archive_store = "archive2"; | 35 local archive_store = "archive2"; |
36 local archive = module:open_store(archive_store, "archive"); | 36 local archive = module:open_store(archive_store, "archive"); |
37 if not archive then | 37 if not archive or archive.name == "null" then |
38 module:log("error", "Could not open archive storage"); | 38 module:log("error", "Could not open archive storage"); |
39 return | 39 return |
40 elseif not archive.find then | 40 elseif not archive.find then |
41 module:log("error", "mod_%s does not support archiving, switch to mod_storage_sql2", archive._provided_by); | 41 module:log("error", "mod_%s does not support archiving, switch to mod_storage_sql2", archive._provided_by); |
42 return | 42 return |