[asterisk-commits] moy: branch moy/mfcr2-1.4 r213792 - /team/moy/mfcr2-1.4/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 24 00:16:39 CDT 2009


Author: moy
Date: Mon Aug 24 00:16:36 2009
New Revision: 213792

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=213792
Log:
fix chanisavail issue in 1.4 branch

Modified:
    team/moy/mfcr2-1.4/channels/chan_dahdi.c

Modified: team/moy/mfcr2-1.4/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/moy/mfcr2-1.4/channels/chan_dahdi.c?view=diff&rev=213792&r1=213791&r2=213792
==============================================================================
--- team/moy/mfcr2-1.4/channels/chan_dahdi.c (original)
+++ team/moy/mfcr2-1.4/channels/chan_dahdi.c Mon Aug 24 00:16:36 2009
@@ -3428,7 +3428,7 @@
 			ast_log(LOG_WARNING, "Unable to set law on channel %d to default: %s\n", p->channel, strerror(errno));
 		/* Perform low level hangup if no owner left */
 #ifdef HAVE_OPENR2
-		if (p->mfcr2) {
+		if (p->mfcr2 && p->mfcr2call && openr2_chan_get_direction(p->r2chan) != OR2_DIR_STOPPED) {
 			ast_log(LOG_DEBUG, "disconnecting MFC/R2 call on chan %d\n", p->channel);
 			ast_log(LOG_DEBUG, "ast->hangupcause is %d\n", ast->hangupcause);
 			if (openr2_chan_get_direction(p->r2chan) == OR2_DIR_BACKWARD && p->mfcr2_forced_release) {
@@ -3442,7 +3442,11 @@
 				dahdi_r2_disconnect_call(p, r2cause);
 			}
 			dahdi_r2_update_monitor_count(p->mfcr2, 1);
-		}	
+		} else if (p->mfcr2call) {
+			ast_log(LOG_DEBUG, "Clearing call request on channel %d\n", p->channel);
+			p->mfcr2call = 0;
+			dahdi_r2_update_monitor_count(p->mfcr2, 1);
+		}
 #endif
 #ifdef HAVE_PRI
 		if (p->pri) {




More information about the asterisk-commits mailing list