[asterisk-commits] jpeeler: trunk r147952 - /trunk/main/features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 9 14:27:33 CDT 2008
Author: jpeeler
Date: Thu Oct 9 14:27:32 2008
New Revision: 147952
URL: http://svn.digium.com/view/asterisk?view=rev&rev=147952
Log:
(closes issue #13139)
Reported by: krisk84
Tested by: krisk84
This change prevents a call that is placed in the parkinglot to be picked up before the PBX is finished. If another extension dials the parking extension before the PBX thread has completed at minimum warnings will occur about the PBX not properly being terminated. At worst, a crash could occur.
Modified:
trunk/main/features.c
Modified: trunk/main/features.c
URL: http://svn.digium.com/view/asterisk/trunk/main/features.c?view=diff&rev=147952&r1=147951&r2=147952
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Thu Oct 9 14:27:32 2008
@@ -2857,6 +2857,10 @@
AST_LIST_LOCK(&parkinglot->parkings);
AST_LIST_TRAVERSE_SAFE_BEGIN(&parkinglot->parkings, pu, list) {
if (!data || pu->parkingnum == park) {
+ if (pu->chan->pbx) { /* do not allow call to be picked up until the PBX thread is finished */
+ AST_LIST_UNLOCK(&parkinglot->parkings);
+ return -1;
+ }
AST_LIST_REMOVE_CURRENT(list);
break;
}
More information about the asterisk-commits
mailing list