aboutsummaryrefslogtreecommitdiffstats
path: root/main/features.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-09 19:27:32 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-09 19:27:32 +0000
commit6696957139da23fe15d16dc3df03115eb521d277 (patch)
tree56c27548657385160b46836c0153d73b2eb31e29 /main/features.c
parentb7a60da13665eff1172c57c5e270e7a5f7531551 (diff)
(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. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147952 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r--main/features.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/features.c b/main/features.c
index 63bf1952a..988444192 100644
--- a/main/features.c
+++ b/main/features.c
@@ -2857,6 +2857,10 @@ static int park_exec_full(struct ast_channel *chan, void *data, struct ast_parki
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;
}