[asterisk-commits] rmeyerriecks: branch 12 r410747 - in /branches/12: ./ main/callerid.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 17 16:38:33 CDT 2014


Author: rmeyerriecks
Date: Mon Mar 17 16:38:28 2014
New Revision: 410747

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=410747
Log:
callerid: Logic error in checksum processing

Callerid checksum-ing was being handled incorrectly here. When the checksum is
calculated to be 0x00, it will perform 0x100-0x00 which results in 0x100. This
value will then fail the otherwise correct callerid message.

This patch changes the logic to simply add the calculated checksum to the
transmitted 2's compliment checksum.  

Review: https://reviewboard.asterisk.org/r/3356/
(closes issue ASTERISK-23488)
........

Merged revisions 410710 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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

Modified:
    branches/12/   (props changed)
    branches/12/main/callerid.c

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

Modified: branches/12/main/callerid.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/callerid.c?view=diff&rev=410747&r1=410746&r2=410747
==============================================================================
--- branches/12/main/callerid.c (original)
+++ branches/12/main/callerid.c Mon Mar 17 16:38:28 2014
@@ -621,7 +621,7 @@
 				}
 				break;
 			case 5: /* Check checksum */
-				if (b != (256 - (cid->cksum & 0xff))) {
+				if ((b + cid->cksum) & 0xff)) {
 					ast_log(LOG_NOTICE, "Caller*ID failed checksum\n");
 					/* Try again */
 					cid->sawflag = 0;




More information about the asterisk-commits mailing list