[asterisk-commits] seanbright: trunk r411174 - in /trunk: ./ res/ari/config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 25 13:45:02 CDT 2014


Author: seanbright
Date: Tue Mar 25 13:44:57 2014
New Revision: 411174

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

Merged revisions 411173 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/ari/config.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/ari/config.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ari/config.c?view=diff&rev=411174&r1=411173&r2=411174
==============================================================================
--- trunk/res/ari/config.c (original)
+++ trunk/res/ari/config.c Tue Mar 25 13:44: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 asterisk-commits mailing list