]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Avoid trying to pickup a parked extension before the park operation is completed.
authorJean Galarneau <jgalarneau@digium.com>
Mon, 19 Jul 2010 20:16:36 +0000 (20:16 +0000)
committerJean Galarneau <jgalarneau@digium.com>
Mon, 19 Jul 2010 20:16:36 +0000 (20:16 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@277906 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_features.c

index 2866207296af24dfadc3d057fd7f2ac8ce1b7933..9298e6c8f212209739bece16f13417afb70ab55d 100644 (file)
@@ -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);