[asterisk-commits] jrose: branch 11 r376310 - in /branches/11: ./ apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 15 17:03:45 CST 2012


Author: jrose
Date: Thu Nov 15 17:03:41 2012
New Revision: 376310

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376310
Log:
app_meetme: Fix channels lingering when hung up under certain conditions

Channels would get stuck and MeetMe would repeatedly display an Unable
to write frame to channel error in the conf_run function if hung up
during certain sound prompts such as during user count announcements.
This patch fixes that by reintroducing a hangup check in the meetme's
main loop (also in conf_run).

(closes issue ASTERISK-20486)
Reported by: Michael Cargile
Review: https://reviewboard.asterisk.org/r/2187/
Patches:
    meetme_hangup_patch_ASTERISK-20486_v3.diff uploaded by Jonathan Rose (license 6182)
........

Merged revisions 376307 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 376308 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    branches/11/   (props changed)
    branches/11/apps/app_meetme.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: branches/11/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_meetme.c?view=diff&rev=376310&r1=376309&r2=376310
==============================================================================
--- branches/11/apps/app_meetme.c (original)
+++ branches/11/apps/app_meetme.c Thu Nov 15 17:03:41 2012
@@ -3391,6 +3391,11 @@
 				break;
 			}
 
+			/* Perform a hangup check here since ast_waitfor_nandfds will not always be able to get a channel after a hangup has occurred */
+			if (ast_check_hangup(chan)) {
+				break;
+			}
+
 			c = ast_waitfor_nandfds(&chan, 1, &fd, nfds, NULL, &outfd, &ms);
 
 			if (c) {
@@ -3475,12 +3480,12 @@
 					}
 
 					if (musiconhold) {
-			   			ast_moh_stop(chan);
+						ast_moh_stop(chan);
 					}
 					if (menu8_active) {
 						/* *8 Submenu */
 						dtmf = f->subclass.integer;
-						if (dtmf) {
+						if (dtmf > 0) {
 							int keepplaying;
 							int playednamerec;
 							struct ao2_iterator user_iter;
@@ -3639,7 +3644,7 @@
 						} else {
 							dtmf = f->subclass.integer;
 						}
-						if (dtmf) {
+						if (dtmf > 0) {
 							switch(dtmf) {
 							case '1': /* Un/Mute */
 								menu_active = 0;
@@ -3746,7 +3751,7 @@
 						} else {
 							dtmf = f->subclass.integer;
 						}
-						if (dtmf) {
+						if (dtmf > 0) {
 							switch (dtmf) {
 							case '1': /* Un/Mute */
 								menu_active = 0;




More information about the asterisk-commits mailing list