[asterisk-commits] rmudgett: branch 11 r433816 - /branches/11/channels/sip/dialplan_functions.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 31 11:47:45 CDT 2015


Author: rmudgett
Date: Tue Mar 31 11:47:42 2015
New Revision: 433816

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=433816
Log:
chan_sip: Fix expression in unit test /channels/chan_sip/test_sip_rtpqos.

Fix misplaced parentheses in original fabs() expression.

Modified:
    branches/11/channels/sip/dialplan_functions.c

Modified: branches/11/channels/sip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/sip/dialplan_functions.c?view=diff&rev=433816&r1=433815&r2=433816
==============================================================================
--- branches/11/channels/sip/dialplan_functions.c (original)
+++ branches/11/channels/sip/dialplan_functions.c Tue Mar 31 11:47:42 2015
@@ -384,7 +384,7 @@
 			for (j = 1.0; j < 10.0; j += 0.3) {
 				*lookup[i].d8 = j;
 				ast_str_substitute_variables(&buffer, 0, chan, ast_str_buffer(varstr));
-				if (sscanf(ast_str_buffer(buffer), "%lf", &cmpdbl) != 1 || abs(j - cmpdbl > .05)) {
+				if (sscanf(ast_str_buffer(buffer), "%lf", &cmpdbl) != 1 || fabs(j - cmpdbl) > .05) {
 					res = AST_TEST_FAIL;
 					ast_test_status_update(test, "%s != %f != %s\n", ast_str_buffer(varstr), j, ast_str_buffer(buffer));
 					break;




More information about the asterisk-commits mailing list