[asterisk-commits] dbailey: trunk r169325 - /trunk/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 19 12:22:44 CST 2009


Author: dbailey
Date: Mon Jan 19 12:22:44 2009
New Revision: 169325

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=169325
Log:
Get rid of magic number and replace with DAHDI_VMWI_NUMBER_MASK when 
determining the number of messages pending for MWI call

Modified:
    trunk/channels/chan_dahdi.c

Modified: trunk/channels/chan_dahdi.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=169325&r1=169324&r2=169325
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Mon Jan 19 12:22:44 2009
@@ -8258,10 +8258,10 @@
 								}
 #else
 								/* New DAHDI_VMWI ioctl supports upto 65535 messages*/
-								if (res > 0xffff) {
-									res2 = (last->mwisendtype | 0xffff);
+								if (res > DAHDI_VMWI_NUMBER_MASK) {
+									res2 = (last->mwisendtype | DAHDI_VMWI_NUMBER_MASK);
 								} else {
-									res2 = (last->mwisendtype | (res & 0xffff));
+									res2 = (last->mwisendtype | (res & DAHDI_VMWI_NUMBER_MASK));
 								}
 								res2 = ioctl(last->subs[SUB_REAL].dfd, DAHDI_VMWI, &res2);
 								if (res2) {




More information about the asterisk-commits mailing list