[asterisk-commits] irroot: branch irroot/patches r337965 - /team/irroot/patches/framehook-1.8.patch

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Sep 25 09:04:15 CDT 2011


Author: irroot
Date: Sun Sep 25 09:04:12 2011
New Revision: 337965

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=337965
Log:
Framehook fixes for versions <= 1.8.4

Added:
    team/irroot/patches/framehook-1.8.patch   (with props)

Added: team/irroot/patches/framehook-1.8.patch
URL: http://svnview.digium.com/svn/asterisk/team/irroot/patches/framehook-1.8.patch?view=auto&rev=337965
==============================================================================
--- team/irroot/patches/framehook-1.8.patch (added)
+++ team/irroot/patches/framehook-1.8.patch Sun Sep 25 09:04:12 2011
@@ -1,0 +1,74 @@
+diff -ur asterisk-1.8.4/apps/app_dial.c asterisk-1.8.4-fh/apps/app_dial.c
+--- asterisk-1.8.4/apps/app_dial.c	2011-07-02 18:55:05.000000000 +0200
++++ asterisk-1.8.4-fh/apps/app_dial.c	2011-07-02 18:56:20.000000000 +0200
+@@ -65,6 +65,7 @@
+ #include "asterisk/aoc.h"
+ #include "asterisk/ccss.h"
+ #include "asterisk/indications.h"
++#include "asterisk/framehook.h"
+ 
+ /*** DOCUMENTATION
+ 	<application name="Dial" language="en_US">
+@@ -626,7 +627,8 @@
+ 	OPT_CALLER_HANGUP | OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER | \
+ 	OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK |  \
+ 	OPT_CALLER_PARK | OPT_ANNOUNCE | OPT_CALLEE_MACRO | OPT_CALLEE_GOSUB) && \
+-	!chan->audiohooks && !peer->audiohooks)
++	!chan->audiohooks && !peer->audiohooks && \
++	ast_framehook_list_is_empty(chan->framehooks) && ast_framehook_list_is_empty(peer->framehooks))
+ 
+ /*
+  * The list of active channels
+diff -ur asterisk-1.8.4/main/channel.c asterisk-1.8.4-fh/main/channel.c
+--- asterisk-1.8.4/main/channel.c	2011-07-02 18:55:05.000000000 +0200
++++ asterisk-1.8.4-fh/main/channel.c	2011-07-02 18:56:20.000000000 +0200
+@@ -4265,7 +4265,9 @@
+ 		awesome_frame = ast_frdup(&frame);
+ 
+ 		/* who knows what we will get back! the anticipation is killing me. */
+-		if (!(awesome_frame = ast_framehook_list_read_event(chan->framehooks, &frame))) {
++		if (!(awesome_frame = ast_framehook_list_write_event(chan->framehooks, awesome_frame))
++			|| awesome_frame->frametype != AST_FRAME_CONTROL) {
++
+ 			res = 0;
+ 			goto indicate_cleanup;
+ 		}
+@@ -7215,6 +7217,7 @@
+ 		    (c0->tech->bridge == c1->tech->bridge) &&
+ 		    !c0->monitor && !c1->monitor &&
+ 		    !c0->audiohooks && !c1->audiohooks &&
++		    ast_framehook_list_is_empty(c0->framehooks) && ast_framehook_list_is_empty(c1->framehooks) &&
+ 		    !c0->masq && !c0->masqr && !c1->masq && !c1->masqr) {
+ 			int timeoutms = to - 1000 > 0 ? to - 1000 : to;
+ 			/* Looks like they share a bridge method and nothing else is in the way */
+diff -ur asterisk-1.8.4/main/rtp_engine.c asterisk-1.8.4-fh/main/rtp_engine.c
+--- asterisk-1.8.4/main/rtp_engine.c	2011-07-02 18:55:05.000000000 +0200
++++ asterisk-1.8.4-fh/main/rtp_engine.c	2011-07-02 18:56:20.000000000 +0200
+@@ -39,6 +39,7 @@
+ #include "asterisk/pbx.h"
+ #include "asterisk/translate.h"
+ #include "asterisk/netsock2.h"
++#include "asterisk/framehook.h"
+ 
+ struct ast_srtp_res *res_srtp = NULL;
+ struct ast_srtp_policy_res *res_srtp_policy = NULL;
+@@ -851,7 +852,8 @@
+ 		if ((c0->tech_pvt != pvt0) ||
+ 		    (c1->tech_pvt != pvt1) ||
+ 		    (c0->masq || c0->masqr || c1->masq || c1->masqr) ||
+-		    (c0->monitor || c0->audiohooks || c1->monitor || c1->audiohooks)) {
++		    (c0->monitor || c0->audiohooks || c1->monitor || c1->audiohooks) ||
++		    (!ast_framehook_list_is_empty(c0->framehooks) || !ast_framehook_list_is_empty(c1->framehooks))) {
+ 			ast_debug(1, "rtp-engine-local-bridge: Oooh, something is weird, backing out\n");
+ 			/* If a masquerade needs to happen we have to try to read in a frame so that it actually happens. Without this we risk being called again and going into a loop */
+ 			if ((c0->masq || c0->masqr) && (fr = ast_read(c0))) {
+@@ -1024,7 +1026,8 @@
+ 		if ((c0->tech_pvt != pvt0) ||
+ 		    (c1->tech_pvt != pvt1) ||
+ 		    (c0->masq || c0->masqr || c1->masq || c1->masqr) ||
+-		    (c0->monitor || c0->audiohooks || c1->monitor || c1->audiohooks)) {
++		    (c0->monitor || c0->audiohooks || c1->monitor || c1->audiohooks) ||
++		    (!ast_framehook_list_is_empty(c0->framehooks) || !ast_framehook_list_is_empty(c1->framehooks))) {
+ 			ast_debug(1, "Oooh, something is weird, backing out\n");
+ 			res = AST_BRIDGE_RETRY;
+ 			break;

Propchange: team/irroot/patches/framehook-1.8.patch
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/irroot/patches/framehook-1.8.patch
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/irroot/patches/framehook-1.8.patch
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list