From: Sean Bright Date: Tue, 25 Mar 2014 18:43:57 +0000 (+0000) Subject: ARI: Don't complain about missing ARI users when we aren't enabled X-Git-Tag: 12.2.0-rc1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c90a39b6b8364e9fc53f1ca57e3e35afd33ada78;p=thirdparty%2Fasterisk.git ARI: Don't complain about missing ARI users when we aren't enabled Currently, if ARI is not enabled it will still complain that there are no configured users. This patch checks to see if ARI is enabled before logging and error or iterating the container to validate the users. Review: https://reviewboard.asterisk.org/r/3391/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411173 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/ari/config.c b/res/ari/config.c index e25fa8ad1f..59c4d7d949 100644 --- a/res/ari/config.c +++ b/res/ari/config.c @@ -290,12 +290,14 @@ static int process_config(int reload) return -1; } - if (ao2_container_count(conf->users) == 0) { - ast_log(LOG_ERROR, "No configured users for ARI\n"); + if (conf->general->enabled) { + if (ao2_container_count(conf->users) == 0) { + ast_log(LOG_ERROR, "No configured users for ARI\n"); + } else { + ao2_callback(conf->users, OBJ_NODATA, validate_user_cb, NULL); + } } - ao2_callback(conf->users, OBJ_NODATA, validate_user_cb, NULL); - return 0; }