mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
ari: Update model validator based on addition of asterisk_id.
ASTERISK-26470 Change-Id: I9c386f7a1c7d969161b28f189eb6298bbc5b7541
This commit is contained in:
@@ -5510,6 +5510,15 @@ int ast_ari_validate_playback_continuing(struct ast_json *json)
|
||||
int has_playback = 0;
|
||||
|
||||
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
|
||||
if (strcmp("asterisk_id", ast_json_object_iter_key(iter)) == 0) {
|
||||
int prop_is_valid;
|
||||
prop_is_valid = ast_ari_validate_string(
|
||||
ast_json_object_iter_value(iter));
|
||||
if (!prop_is_valid) {
|
||||
ast_log(LOG_ERROR, "ARI PlaybackContinuing field asterisk_id failed validation\n");
|
||||
res = 0;
|
||||
}
|
||||
} else
|
||||
if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
|
||||
int prop_is_valid;
|
||||
has_type = 1;
|
||||
|
Reference in New Issue
Block a user