[Asterisk-cvs] asterisk/res res_features.c,1.11,1.12

markster at lists.digium.com markster at lists.digium.com
Fri Sep 10 11:09:37 CDT 2004


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

Modified Files:
	res_features.c 
Log Message:
Properly lock management stuff (bug #2406)


Index: res_features.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_features.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- res_features.c	1 Sep 2004 19:51:19 -0000	1.11
+++ res_features.c	10 Sep 2004 15:11:38 -0000	1.12
@@ -797,6 +797,7 @@
 
         cur=parkinglot;
         while(cur) {
+			ast_mutex_lock(&s->lock);
                 ast_cli(s->fd, "Event: ParkedCall\r\n"
 			"Exten: %d\r\n"
 			"Channel: %s\r\n"
@@ -808,8 +809,9 @@
                         ,(long)cur->start.tv_sec + (long)(cur->parkingtime/1000) - (long)time(NULL)
 			,(cur->chan->callerid ? cur->chan->callerid : "")
 			,idText);
+			ast_mutex_unlock(&s->lock);
 
-                cur = cur->next;
+            cur = cur->next;
         }
 
 	ast_cli(s->fd,




More information about the svn-commits mailing list