[svn-commits] mjordan: trunk r432972 - in /trunk: ./ main/format_cap.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 13 21:29:31 CDT 2015


Author: mjordan
Date: Fri Mar 13 21:29:29 2015
New Revision: 432972

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432972
Log:
main/frame: Don't report empty disallow values as an error

In realtime, it is normal to have a database with both 'allow' and 'disallow'
columns in the schema. It is perfectly valid to have an 'allow' value of
'!all,g722,ulaw,alaw' and no 'disallow' value. Unlike in static conf files,
you can't *not* provide the disallow value. Thus, the empty disallow value
causes a spurious WARNING message, which is kind of annoying.

This patch makes it so that a 'disallow' value with no ... value ... is
ignored. Granted, you can still screw this up as well, as technically
specifying 'disallow=all,!ulaw' allows only ulaw, and then you would have no
'allow' value in your database. But really, why would you do that? WHY?

ASTERISK-16779 #close
Reported by: Atis Lezdins
........

Merged revisions 432970 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 432971 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/main/format_cap.c

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

Modified: trunk/main/format_cap.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/format_cap.c?view=diff&rev=432972&r1=432971&r2=432972
==============================================================================
--- trunk/main/format_cap.c (original)
+++ trunk/main/format_cap.c Fri Mar 13 21:29:29 2015
@@ -318,6 +318,10 @@
 {
 	int res = 0, all = 0, iter_allowing;
 	char *parse = NULL, *this = NULL, *psize = NULL;
+
+	if (!allowing && ast_strlen_zero(list)) {
+		return 0;
+	}
 
 	parse = ast_strdupa(list);
 	while ((this = strsep(&parse, ","))) {




More information about the svn-commits mailing list