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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 27 09:23:41 CST 2009


Author: dbailey
Date: Tue Jan 27 09:23:40 2009
New Revision: 171558

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=171558
Log:
Handle new VMWI ioctl structure (Now there are two VMWI ioctl calls.)  

(issue #14104)
Reported by: alecdavis
Tested by: dbailey


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=171558&r1=171557&r2=171558
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Jan 27 09:23:40 2009
@@ -8249,21 +8249,12 @@
 								!ast_strlen_zero(last->mailbox) && (thispass - last->onhooktime > 3)) {
 							res = has_voicemail(last);
 							if (last->msgstate != res) {
-#ifndef HAVE_DAHDI_LINEREVERSE_VMWI
 								/* Set driver resources for signalling VMWI */
 								res2 = ioctl(last->subs[SUB_REAL].dfd, DAHDI_VMWI, &res);
 								if (res2) {
 									/* TODO: This message will ALWAYS be generated on some cards; any way to restrict it to those cards where it is interesting? */
 									ast_debug(3, "Unable to control message waiting led on channel %d: %s\n", last->channel, strerror(errno));
 								}
-#else
-								last->mwisend_setting.messages = res;
-								res2 = ioctl(last->subs[SUB_REAL].dfd, DAHDI_VMWI, &last->mwisend_setting);
-								if (res2) {
-									/* TODO: This message will ALWAYS be generated on some cards; any way to restrict it to those cards where it is interesting? */
-									ast_debug(3, "Unable to control MWI on channel %d: %s\n", last->channel, strerror(errno));
-								}
-#endif
 								/* If enabled for FSK spill then initiate it */
 								if (mwi_send_init(last)) {
 									ast_log(LOG_WARNING, "Unable to initiate mwi send sequence on channel %d\n", last->channel);
@@ -9031,6 +9022,9 @@
 			if (!res) {
 				tmp->fxsoffhookstate = p.rxisoffhook;
 			}
+#ifdef HAVE_DAHDI_LINEREVERSE_VMWI
+			res = ioctl(tmp->subs[SUB_REAL].dfd, DAHDI_VMWI_CONFIG, &tmp->mwisend_setting);
+#endif
 		}
 		tmp->onhooktime = time(NULL);
 		tmp->group = conf->chan.group;




More information about the asterisk-commits mailing list