[Asterisk-cvs] asterisk/res res_features.c,1.5,1.6

malcolmd at lists.digium.com malcolmd at lists.digium.com
Tue Aug 3 10:23:46 CDT 2004


Update of /usr/cvsroot/asterisk/res
In directory localhost.localdomain:/tmp/cvs-serv5721/res

Modified Files:
	res_features.c 
Log Message:
Add BKW's fix so that MOH doesn't get killed on Call Parking


Index: res_features.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_features.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- res_features.c	3 Aug 2004 06:31:20 -0000	1.5
+++ res_features.c	3 Aug 2004 14:09:48 -0000	1.6
@@ -481,6 +481,7 @@
 	char exten[AST_MAX_EXTENSION];
 	struct ast_context *con;
 	int x;
+	int gc=0;
 	fd_set rfds, efds;
 	fd_set nrfds, nefds;
 	FD_ZERO(&rfds);
@@ -501,6 +502,10 @@
 				pu = pu->next;
 				continue;
 			}
+			if (gc < 5 && !pu->chan->generator) {
+				gc++;
+				ast_moh_start(pu->chan,NULL);
+			}
 			tms = (tv.tv_sec - pu->start.tv_sec) * 1000 + (tv.tv_usec - pu->start.tv_usec) / 1000;
 			if (tms > pu->parkingtime) {
 				/* They've been waiting too long, send them back to where they came.  Theoretically they




More information about the svn-commits mailing list