diff options
author | jeang <jeang@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-19 20:16:36 +0000 |
---|---|---|
committer | jeang <jeang@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-19 20:16:36 +0000 |
commit | 64f6783ca21424dd1cdfc759d04bb618e4b66992 (patch) | |
tree | d1583946df125f71db8e2424224e7f897b86e6ff | |
parent | 3e76e0b91c1412035bd075fe9942bd2df932bb73 (diff) |
Avoid trying to pickup a parked extension before the park operation is completed.
A crash could occur if the extension is picked up while the parking extension is
being announced. Testing pu->notquiteyet while searching for a parked extension
resolves this crash.
(ABE-2418)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@277906 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | res/res_features.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_features.c b/res/res_features.c index 286620729..9298e6c8f 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -2535,7 +2535,7 @@ static int park_exec(struct ast_channel *chan, void *data) ast_mutex_lock(&parking_lock); pu = parkinglot; while(pu) { - if (pu->parkingnum == park) { + if (pu->parkingnum == park && !pu->notquiteyet) { if (pu->chan->pbx) { /* do not allow call to be picked up until the PBX thread is finished */ ast_mutex_unlock(&parking_lock); ast_module_user_remove(u); |