[Asterisk-code-review] loader: Fix result of module reload error. (asterisk[15])
Corey Farrell
asteriskteam at digium.com
Tue Oct 2 01:31:12 CDT 2018
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/10350
Change subject: loader: Fix result of module reload error.
......................................................................
loader: Fix result of module reload error.
When a module reload fails we never set AST_MODULE_RELOAD_ERROR. This
caused reload failures to incorrectly report 'No module found'.
Change-Id: I5f3953e0f7d135e53ec797f24c97ee3f73f232e7
---
M main/loader.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/50/10350/1
diff --git a/main/loader.c b/main/loader.c
index c495d76..f9271af 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -1010,6 +1010,8 @@
if (!name || !strcasecmp(name, reload_classes[i].name)) {
if (reload_classes[i].reload_fn() == AST_MODULE_LOAD_SUCCESS) {
res = AST_MODULE_RELOAD_SUCCESS;
+ } else if (res == AST_MODULE_RELOAD_NOT_FOUND) {
+ res = AST_MODULE_RELOAD_ERROR;
}
}
}
@@ -1051,6 +1053,8 @@
ast_verb(3, "Reloading module '%s' (%s)\n", cur->resource, info->description);
if (info->reload() == AST_MODULE_LOAD_SUCCESS) {
res = AST_MODULE_RELOAD_SUCCESS;
+ } else if (res == AST_MODULE_RELOAD_NOT_FOUND) {
+ res = AST_MODULE_RELOAD_ERROR;
}
if (name) {
break;
--
To view, visit https://gerrit.asterisk.org/10350
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f3953e0f7d135e53ec797f24c97ee3f73f232e7
Gerrit-Change-Number: 10350
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181002/3e621ef8/attachment.html>
More information about the asterisk-code-review
mailing list