[Asterisk-cvs] asterisk/apps app_externalivr.c,1.4,1.5

kpfleming kpfleming
Thu Aug 25 14:28:16 CDT 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv32706/apps

Modified Files:
	app_externalivr.c 
Log Message:
fix race condition


Index: app_externalivr.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_externalivr.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- app_externalivr.c	24 Aug 2005 23:10:55 -0000	1.4
+++ app_externalivr.c	25 Aug 2005 18:30:02 -0000	1.5
@@ -387,7 +387,7 @@
 				if (f->frametype == AST_FRAME_DTMF) {
 					send_child_event(child_events, f->subclass, NULL, chan);
 					if (u->option_autoclear) {
-						if (!u->playing_silence)
+						if (!u->list_cleared && !u->playing_silence)
 							send_child_event(child_events, 'T', NULL, chan);
 						AST_LIST_LOCK(&u->playlist);
 						while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {
@@ -431,7 +431,7 @@
 						send_child_event(child_events, 'Z', NULL, chan);
 						strcpy(&input[2], "exception");
 					}
-					if (!u->playing_silence)
+					if (!u->list_cleared && !u->playing_silence)
 						send_child_event(child_events, 'T', NULL, chan);
 					AST_LIST_LOCK(&u->playlist);
 					while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {




More information about the svn-commits mailing list