[Asterisk-code-review] ARI: Added new functionality to load a single module. (asterisk[13])

Mark Michelson asteriskteam at digium.com
Wed Jul 8 10:26:14 CDT 2015


Mark Michelson has posted comments on this change.

Change subject: ARI: Added new functionality to load a single module.
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/807/1/res/ari/resource_asterisk.c
File res/ari/resource_asterisk.c:

Line 168: 	if (load_result == 1) {
        : 		ast_ari_response_error(
        : 			response, 404, "Not Found",
        : 			"Module does not exist");
        : 		return;
        : 	} else if (load_result == 2 || load_result == -1) {
        : 		ast_ari_response_error(
        : 			response, 409, "Conflict",
        : 			"Module could not be loaded");
        : 		return;
        : 	}
> I'll change the if integer comparisons, that does make more sense.
AST_MODULE_LOAD_PRIORITY and AST_MODULE_LOAD_SKIP are return values that you should never actually see when loading modules in a context such as this one. Those are used mainly by the loader when it is loading lists of modules on startup. If you see one of those values get returned, it means something is weird and has gone wrong. I'd stick with the 404 return for those for the time being (as well as of course for AST_MODULE_LOAD_DECLINE or AST_MODULE_LOAD_FAILURE)


-- 
To view, visit https://gerrit.asterisk.org/807
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9e05d5b8c5c666ecfef341504f9edc1aa84fda33
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list