fixes deadlock when performing directed pickup w Invite/replaces
authorDavid Vossel <dvossel@digium.com>
Thu, 17 Sep 2009 22:37:28 +0000 (22:37 +0000)
committerDavid Vossel <dvossel@digium.com>
Thu, 17 Sep 2009 22:37:28 +0000 (22:37 +0000)
(closes issue #15340)
Reported by: lmsteffan
Patches:
      deadlock.patch uploaded by lmsteffan (license 779)
Tested by: lmsteffan

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219371 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 78e7875..ce2f3de 100644 (file)
@@ -20723,7 +20723,9 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
                        do_magic_pickup(c, pickup.exten, pickup.context);
 
                        /* Now we're either masqueraded or we failed to pickup, in either case we... */
+                       sip_pvt_unlock(p);
                        ast_hangup(c);
+                       sip_pvt_lock(p);
 
                        return 0;
                } else {