[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r193982 - /team/jpeeler/asteri...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 12 16:22:07 CDT 2009


Author: jpeeler
Date: Tue May 12 16:21:54 2009
New Revision: 193982

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=193982
Log:
when bufferoverrideinuse enabled, revert them before analog hangup is called

Modified:
    team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=193982&r1=193981&r2=193982
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Tue May 12 16:21:54 2009
@@ -5240,6 +5240,22 @@
 		restore_gains(p);
 		p->ignoredtmf = 0;
 	
+		if (p->bufferoverrideinuse) {
+			/* faxbuffers are in use, revert them */
+			struct dahdi_bufferinfo bi = {
+				.txbufpolicy = p->buf_policy,
+				.rxbufpolicy = p->buf_policy,
+				.bufsize = p->bufsize,
+				.numbufs = p->buf_no
+			};
+			int bpres;
+
+			if ((bpres = ioctl(p->subs[SUB_REAL].dfd, DAHDI_SET_BUFINFO, &bi)) < 0) {
+				ast_log(LOG_WARNING, "Channel '%s' unable to revert faxbuffer policy: %s\n", ast->name, strerror(errno));
+			}
+			p->bufferoverrideinuse = 0;	
+		}
+
 		res = analog_hangup(p->sig_pvt, ast);
 
 		goto hangup_out;




More information about the asterisk-commits mailing list