[Asterisk-code-review] ARI: Add support for push configuration of dynamic object (asterisk[13])
Kevin Harwell
asteriskteam at digium.com
Fri Jul 10 11:03:29 CDT 2015
Kevin Harwell has posted comments on this change.
Change subject: ARI: Add support for push configuration of dynamic object
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/853/1/res/ari/resource_asterisk.c
File res/ari/resource_asterisk.c:
Line 77: if (ast_json_array_append(return_set, tuple)) {
: ast_variables_destroy(change_set);
: ast_ari_response_alloc_failed(response);
: return;
tuple needs releasing here.
Line 254: sorcery = ast_sorcery_retrieve_by_module_name(args->config_class);
: if (!sorcery) {
: ast_ari_response_error(
: response, 404, "Not Found",
: "configClass '%s' not found",
: args->config_class);
: return;
: }
:
: object_type = ast_sorcery_get_object_type(sorcery, args->object_type);
: if (!object_type) {
: ast_ari_response_error(
: response, 404, "Not Found",
: "objectType '%s' not found",
: args->object_type);
: return;
: }
This code is repeated several times. Would it make sense to abstract it out?
--
To view, visit https://gerrit.asterisk.org/853
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I28cd5c7bf6f67f8e9e437ff097f8fd171d30ff5c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list