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

Benjamin Keith Ford asteriskteam at digium.com
Wed Jul 8 09:31:40 CDT 2015


Benjamin Keith Ford 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 would alter these if checks. First, instead of using comparisons to integ
I'll change the if integer comparisons, that does make more sense.
I could be wrong, but I looked at the values 0 (loaded and configured) and 3 (not loaded yet, but added to priority heap) as a success, and the values 1 (module not configured) as a 404 not found, and 2 (module skipped) and -1 (could not be loaded properly) as 409 conflicts, since that signifies (to me) that the module could have been loaded, but encountered an error.
If 404s are more appropriate for all, I can easily change that!


-- 
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