Software / code / prosody
Comparison
core/modulemanager.lua @ 4383:718445c040c4
modulemanager: Fix undefined global access in handling of module.save error handling.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Wed, 21 Sep 2011 03:25:34 +0500 |
| parent | 4381:bf81b4784853 |
| child | 4454:c73793664bfb |
comparison
equal
deleted
inserted
replaced
| 4382:29581d16450c | 4383:718445c040c4 |
|---|---|
| 213 if module_has_method(mod, "save") then | 213 if module_has_method(mod, "save") then |
| 214 local ok, ret, err = call_module_method(mod, "save"); | 214 local ok, ret, err = call_module_method(mod, "save"); |
| 215 if ok then | 215 if ok then |
| 216 saved = ret; | 216 saved = ret; |
| 217 else | 217 else |
| 218 log("warn", "Error saving module '%s:%s' state: %s", host, module, ret); | 218 log("warn", "Error saving module '%s:%s' state: %s", host, name, ret); |
| 219 if not config.get(host, "core", "force_module_reload") then | 219 if not config.get(host, "core", "force_module_reload") then |
| 220 log("warn", "Aborting reload due to error, set force_module_reload to ignore this"); | 220 log("warn", "Aborting reload due to error, set force_module_reload to ignore this"); |
| 221 return nil, "save-state-failed"; | 221 return nil, "save-state-failed"; |
| 222 else | 222 else |
| 223 log("warn", "Continuing with reload (using the force)"); | 223 log("warn", "Continuing with reload (using the force)"); |