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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 7 11:05:37 CST 2009


Author: dbailey
Date: Wed Jan  7 11:05:37 2009
New Revision: 167416

URL: http://svn.digium.com/view/asterisk?view=rev&rev=167416
Log:
Cleanup fsk spill if off hook is detected during mwi spill. 
Correct logic error in handling events when sending mwi spill 
(closes issue #14143)
Reported by: alecdavis
Patches:
      chan_dahdi.handle_init_event2.diff.txt uploaded by dbailey


Modified:
    trunk/channels/chan_dahdi.c

Modified: trunk/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=167416&r1=167415&r2=167416
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Wed Jan  7 11:05:37 2009
@@ -7824,6 +7824,17 @@
 				}
 			}
 			break;
+		/* Going off hook, I need to punt this spill */
+		case DAHDI_EVENT_RINGOFFHOOK:
+			if (pvt->cidspill) {
+				ast_free(pvt->cidspill);
+				pvt->cidspill = NULL;
+				pvt->cidpos = 0; 
+				pvt->cidlen = 0;
+			}
+			pvt->mwisend_data.mwisend_current = MWI_SEND_DONE;
+			pvt->mwisendactive = 0;
+			break;
 		case DAHDI_EVENT_RINGERON:
 		case DAHDI_EVENT_HOOKCOMPLETE:
 			break;
@@ -8271,7 +8282,7 @@
 					ast_debug(1, "Monitor doohicky got event %s on channel %d\n", event2str(res), i->channel);
 					/* Don't hold iflock while handling init events */
 					ast_mutex_unlock(&iflock);
-					if (0 == i->mwisendactive || 0 != mwi_send_process_event(i, res)) {
+					if (0 == i->mwisendactive || 0 == mwi_send_process_event(i, res)) {
 						handle_init_event(i, res);
 					}
 					ast_mutex_lock(&iflock);




More information about the asterisk-commits mailing list