]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
If the Packet2Packet bridge is being broken because of a masquerade then attempt...
authorJoshua Colp <jcolp@digium.com>
Sat, 30 Dec 2006 05:46:57 +0000 (05:46 +0000)
committerJoshua Colp <jcolp@digium.com>
Sat, 30 Dec 2006 05:46:57 +0000 (05:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49066 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 2c414f2f89a498ed39915e7a4e12c4a184211974..6ddbf735ca66ba0e5474fa750b67e6bf896da020 100644 (file)
@@ -3000,6 +3000,10 @@ static enum ast_bridge_result bridge_p2p_loop(struct ast_channel *c0, struct ast
                    (c1->tech_pvt != pvt1) ||
                    (c0->masq || c0->masqr || c1->masq || c1->masqr)) {
                        ast_log(LOG_DEBUG, "Oooh, something is weird, backing out\n");
+                       if ((c0->masq || c0->masqr) && (fr = ast_read(c0)))
+                               ast_frfree(fr);
+                       if ((c1->masq || c1->masqr) && (fr = ast_read(c1)))
+                               ast_frfree(fr);
                        res = AST_BRIDGE_RETRY;
                        break;
                }