[svn-commits] seanbright: branch 12 r411173 - /branches/12/res/ari/config.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 25 13:44:04 CDT 2014


Author: seanbright
Date: Tue Mar 25 13:43:57 2014
New Revision: 411173

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411173
Log:
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/

Modified:
    branches/12/res/ari/config.c

Modified: branches/12/res/ari/config.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/ari/config.c?view=diff&rev=411173&r1=411172&r2=411173
==============================================================================
--- branches/12/res/ari/config.c (original)
+++ branches/12/res/ari/config.c Tue Mar 25 13:43:57 2014
@@ -290,11 +290,13 @@
 		return -1;
 	}
 
-	if (ao2_container_count(conf->users) == 0) {
-		ast_log(LOG_ERROR, "No configured users for ARI\n");
-	}
-
-	ao2_callback(conf->users, OBJ_NODATA, validate_user_cb, NULL);
+	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);
+		}
+	}
 
 	return 0;
 }




More information about the svn-commits mailing list