[asterisk-commits] twilson: trunk r358907 - in /trunk: apps/ bridges/ channels/ include/asterisk...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 13 13:20:49 CDT 2012


Author: twilson
Date: Tue Mar 13 13:20:34 2012
New Revision: 358907

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358907
Log:
Finalize ast_channel opaquification

Review: https://reviewboard.asterisk.org/r/1786/

Modified:
    trunk/apps/app_channelredirect.c
    trunk/apps/app_chanspy.c
    trunk/apps/app_confbridge.c
    trunk/apps/app_dial.c
    trunk/apps/app_disa.c
    trunk/apps/app_dumpchan.c
    trunk/apps/app_externalivr.c
    trunk/apps/app_followme.c
    trunk/apps/app_macro.c
    trunk/apps/app_mixmonitor.c
    trunk/apps/app_parkandannounce.c
    trunk/apps/app_queue.c
    trunk/apps/app_speech_utils.c
    trunk/apps/app_stack.c
    trunk/apps/app_talkdetect.c
    trunk/bridges/bridge_multiplexed.c
    trunk/channels/chan_agent.c
    trunk/channels/chan_bridge.c
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_local.c
    trunk/channels/chan_phone.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_unistim.c
    trunk/channels/chan_vpb.cc
    trunk/channels/sig_analog.c
    trunk/include/asterisk/channel.h
    trunk/main/app.c
    trunk/main/autoservice.c
    trunk/main/bridging.c
    trunk/main/channel.c
    trunk/main/channel_internal_api.c
    trunk/main/cli.c
    trunk/main/features.c
    trunk/main/file.c
    trunk/main/indications.c
    trunk/main/manager.c
    trunk/main/pbx.c
    trunk/main/rtp_engine.c
    trunk/res/res_agi.c
    trunk/res/res_musiconhold.c
    trunk/res/snmp/agent.c

Modified: trunk/apps/app_channelredirect.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_channelredirect.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_channelredirect.c (original)
+++ trunk/apps/app_channelredirect.c Tue Mar 13 13:20:34 2012
@@ -97,7 +97,7 @@
 	}
 
 	if (ast_channel_pbx(chan2)) {
-		ast_set_flag(chan2, AST_FLAG_BRIDGE_HANGUP_DONT); /* don't let the after-bridge code run the h-exten */
+		ast_set_flag(ast_channel_flags(chan2), AST_FLAG_BRIDGE_HANGUP_DONT); /* don't let the after-bridge code run the h-exten */
 	}
 
 	res = ast_async_parseable_goto(chan2, args.label);

Modified: trunk/apps/app_chanspy.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Tue Mar 13 13:20:34 2012
@@ -489,7 +489,7 @@
 	ast_set_flag(audiohook, AST_AUDIOHOOK_TRIGGER_SYNC | AST_AUDIOHOOK_SMALL_QUEUE);
 	res = ast_audiohook_attach(autochan->chan, audiohook);
 
-	if (!res && ast_test_flag(autochan->chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(autochan->chan))) {
+	if (!res && ast_test_flag(ast_channel_flags(autochan->chan), AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(autochan->chan))) {
 		ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
 	}
 	return res;
@@ -583,7 +583,7 @@
 	}
 
 	ast_channel_lock(chan);
-	ast_set_flag(chan, AST_FLAG_END_DTMF_ONLY);
+	ast_set_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 	ast_channel_unlock(chan);
 
 	csth.volfactor = *volfactor;
@@ -699,7 +699,7 @@
 		ast_deactivate_generator(chan);
 
 	ast_channel_lock(chan);
-	ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
+	ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 	ast_channel_unlock(chan);
 
 	if (ast_test_flag(flags, OPTION_WHISPER | OPTION_BARGE | OPTION_DTMF_SWITCH_MODES)) {
@@ -787,7 +787,7 @@
 	if (ast_channel_state(chan) != AST_STATE_UP)
 		ast_answer(chan);
 
-	ast_set_flag(chan, AST_FLAG_SPYING); /* so nobody can spy on us while we are spying */
+	ast_set_flag(ast_channel_flags(chan), AST_FLAG_SPYING); /* so nobody can spy on us while we are spying */
 
 	waitms = 100;
 
@@ -800,7 +800,7 @@
 			if (!res)
 				res = ast_waitstream(chan, "");
 			else if (res < 0) {
-				ast_clear_flag(chan, AST_FLAG_SPYING);
+				ast_clear_flag(ast_channel_flags(chan), AST_FLAG_SPYING);
 				break;
 			}
 			if (!ast_strlen_zero(exitcontext)) {
@@ -831,7 +831,7 @@
 		res = ast_waitfordigit(chan, waitms);
 		if (res < 0) {
 			iter = ast_channel_iterator_destroy(iter);
-			ast_clear_flag(chan, AST_FLAG_SPYING);
+			ast_clear_flag(ast_channel_flags(chan), AST_FLAG_SPYING);
 			break;
 		}
 		if (!ast_strlen_zero(exitcontext)) {
@@ -873,7 +873,7 @@
 				continue;
 			}
 
-			if (ast_check_hangup(autochan->chan) || ast_test_flag(autochan->chan, AST_FLAG_SPYING)) {
+			if (ast_check_hangup(autochan->chan) || ast_test_flag(ast_channel_flags(autochan->chan), AST_FLAG_SPYING)) {
 				continue;
 			}
 
@@ -1024,7 +1024,7 @@
 	}
 exit:
 
-	ast_clear_flag(chan, AST_FLAG_SPYING);
+	ast_clear_flag(ast_channel_flags(chan), AST_FLAG_SPYING);
 
 	ast_channel_setoption(chan, AST_OPTION_TXGAIN, &zero_volume, sizeof(zero_volume), 0);
 

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Tue Mar 13 13:20:34 2012
@@ -1142,7 +1142,7 @@
 	}
 	cap = ast_format_cap_destroy(cap);
 
-	conference_bridge->playback_chan->bridge = conference_bridge->bridge;
+	ast_channel_internal_bridge_set(conference_bridge->playback_chan, conference_bridge->bridge);
 
 	if (ast_call(conference_bridge->playback_chan, "", 0)) {
 		ast_hangup(conference_bridge->playback_chan);

Modified: trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dial.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Tue Mar 13 13:20:34 2012
@@ -693,7 +693,7 @@
 		if (outgoing->chan && (outgoing->chan != exception)) {
 			if (answered_elsewhere) {
 				/* The flag is used for local channel inheritance and stuff */
-				ast_set_flag(outgoing->chan, AST_FLAG_ANSWERED_ELSEWHERE);
+				ast_set_flag(ast_channel_flags(outgoing->chan), AST_FLAG_ANSWERED_ELSEWHERE);
 				/* This is for the channel drivers */
 				ast_channel_hangupcause_set(outgoing->chan, AST_CAUSE_ANSWERED_ELSEWHERE);
 			}
@@ -2327,12 +2327,12 @@
 		if (outbound_group)
 			ast_app_group_set_channel(tc, outbound_group);
 		/* If the calling channel has the ANSWERED_ELSEWHERE flag set, inherit it. This is to support local channels */
-		if (ast_test_flag(chan, AST_FLAG_ANSWERED_ELSEWHERE))
-			ast_set_flag(tc, AST_FLAG_ANSWERED_ELSEWHERE);
+		if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_ANSWERED_ELSEWHERE))
+			ast_set_flag(ast_channel_flags(tc), AST_FLAG_ANSWERED_ELSEWHERE);
 
 		/* Check if we're forced by configuration */
 		if (ast_test_flag64(&opts, OPT_CANCEL_ELSEWHERE))
-			 ast_set_flag(tc, AST_FLAG_ANSWERED_ELSEWHERE);
+			 ast_set_flag(ast_channel_flags(tc), AST_FLAG_ANSWERED_ELSEWHERE);
 
 
 		/* Inherit context and extension */
@@ -2509,13 +2509,13 @@
 				ast_log(LOG_ERROR, "error streaming file '%s' to callee\n", opt_args[OPT_ARG_ANNOUNCE]);
 			}
 
-			ast_set_flag(peer, AST_FLAG_END_DTMF_ONLY);
+			ast_set_flag(ast_channel_flags(peer), AST_FLAG_END_DTMF_ONLY);
 			while (ast_channel_stream(peer)) {
 				int ms;
 
 				ms = ast_sched_wait(ast_channel_sched(peer));
 
-				if (ms < 0 && !peer->timingfunc) {
+				if (ms < 0 && !ast_channel_timingfunc(peer)) {
 					ast_stopstream(peer);
 					break;
 				}
@@ -2557,7 +2557,7 @@
 				}
 				ast_sched_runq(ast_channel_sched(peer));
 			}
-			ast_clear_flag(peer, AST_FLAG_END_DTMF_ONLY);
+			ast_clear_flag(ast_channel_flags(peer), AST_FLAG_END_DTMF_ONLY);
 		}
 
 		if (chan && peer && ast_test_flag64(&opts, OPT_GOTO) && !ast_strlen_zero(opt_args[OPT_ARG_GOTO])) {
@@ -2847,8 +2847,8 @@
 			
 			ast_channel_exten_set(peer, "h");
 			ast_channel_priority_set(peer, 1);
-			autoloopflag = ast_test_flag(peer, AST_FLAG_IN_AUTOLOOP); /* save value to restore at the end */
-			ast_set_flag(peer, AST_FLAG_IN_AUTOLOOP);
+			autoloopflag = ast_test_flag(ast_channel_flags(peer), AST_FLAG_IN_AUTOLOOP); /* save value to restore at the end */
+			ast_set_flag(ast_channel_flags(peer), AST_FLAG_IN_AUTOLOOP);
 
 			while ((res9 = ast_spawn_extension(peer, ast_channel_context(peer), ast_channel_exten(peer),
 				ast_channel_priority(peer),
@@ -2862,7 +2862,7 @@
 				ast_debug(1, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", ast_channel_context(peer), ast_channel_exten(peer), ast_channel_priority(peer), ast_channel_name(peer));
 				ast_verb(2, "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", ast_channel_context(peer), ast_channel_exten(peer), ast_channel_priority(peer), ast_channel_name(peer));
 			}
-			ast_set2_flag(peer, autoloopflag, AST_FLAG_IN_AUTOLOOP);  /* set it back the way it was */
+			ast_set2_flag(ast_channel_flags(peer), autoloopflag, AST_FLAG_IN_AUTOLOOP);  /* set it back the way it was */
 		}
 		if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON)) {
 			if(!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
@@ -2985,7 +2985,7 @@
 		int continue_exec;
 
 		ast_channel_data_set(chan, "Retrying");
-		if (ast_test_flag(chan, AST_FLAG_MOH))
+		if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH))
 			ast_moh_stop(chan);
 
 		res = dial_exec_full(chan, args.dialdata, &peerflags, &continue_exec);
@@ -3002,7 +3002,7 @@
 						ast_log(LOG_WARNING, "Announce file \"%s\" specified in Retrydial does not exist\n", args.announce);
 				}
 				if (!res && sleepms) {
-					if (!ast_test_flag(chan, AST_FLAG_MOH))
+					if (!ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH))
 						ast_moh_start(chan, NULL, NULL);
 					res = ast_waitfordigit(chan, sleepms);
 				}
@@ -3015,7 +3015,7 @@
 						ast_log(LOG_WARNING, "Announce file \"%s\" specified in Retrydial does not exist\n", args.announce);
 				}
 				if (sleepms) {
-					if (!ast_test_flag(chan, AST_FLAG_MOH))
+					if (!ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH))
 						ast_moh_start(chan, NULL, NULL);
 					if (!res)
 						res = ast_waitfordigit(chan, sleepms);
@@ -3038,7 +3038,7 @@
 	else if (res == 1)
 		res = 0;
 
-	if (ast_test_flag(chan, AST_FLAG_MOH))
+	if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH))
 		ast_moh_stop(chan);
  done:
 	return res;

Modified: trunk/apps/app_disa.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_disa.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_disa.c (original)
+++ trunk/apps/app_disa.c Tue Mar 13 13:20:34 2012
@@ -204,7 +204,7 @@
 
 	play_dialtone(chan, args.mailbox);
 
-	ast_set_flag(chan, AST_FLAG_END_DTMF_ONLY);
+	ast_set_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 
 	for (;;) {
 		  /* if outa time, give em reorder */
@@ -220,7 +220,7 @@
 		}
 
 		if (!(f = ast_read(chan))) {
-			ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
+			ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 			return -1;
 		}
 
@@ -228,7 +228,7 @@
 			if (f->data.uint32)
 				ast_channel_hangupcause_set(chan, f->data.uint32);
 			ast_frfree(f);
-			ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
+			ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 			return -1;
 		}
 
@@ -257,7 +257,7 @@
 						fp = fopen(args.passcode,"r");
 						if (!fp) {
 							ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,ast_channel_name(chan));
-							ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
+							ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 							return -1;
 						}
 						pwline[0] = 0;
@@ -353,7 +353,7 @@
 		}
 	}
 
-	ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
+	ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 
 	if (k == 3) {
 		int recheck = 0;

Modified: trunk/apps/app_dumpchan.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dumpchan.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_dumpchan.c (original)
+++ trunk/apps/app_dumpchan.c Tue Mar 13 13:20:34 2012
@@ -158,7 +158,7 @@
 		hour,
 		min,
 		sec,
-		c->_bridge ? ast_channel_name(c->_bridge) : "<none>",
+		ast_channel_internal_bridged_channel(c) ? ast_channel_name(ast_channel_internal_bridged_channel(c)) : "<none>",
 		ast_bridged_channel(c) ? ast_channel_name(ast_bridged_channel(c)) : "<none>", 
 		ast_channel_context(c),
 		ast_channel_exten(c),
@@ -167,7 +167,7 @@
 		ast_print_group(pgrp, sizeof(pgrp), ast_channel_pickupgroup(c)),
 		ast_channel_appl(c) ? ast_channel_appl(c) : "(N/A)",
 		ast_channel_data(c) ? S_OR(ast_channel_data(c), "(Empty)") : "(None)",
-		(ast_test_flag(c, AST_FLAG_BLOCKING) ? ast_channel_blockproc(c) : "(Not Blocking)"));
+		(ast_test_flag(ast_channel_flags(c), AST_FLAG_BLOCKING) ? ast_channel_blockproc(c) : "(Not Blocking)"));
 
 	return 0;
 }

Modified: trunk/apps/app_externalivr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_externalivr.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_externalivr.c (original)
+++ trunk/apps/app_externalivr.c Tue Mar 13 13:20:34 2012
@@ -640,7 +640,7 @@
 	}
 
  	while (1) {
- 		if (ast_test_flag(chan, AST_FLAG_ZOMBIE)) {
+ 		if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_ZOMBIE)) {
  			ast_chan_log(LOG_ERROR, chan, "Is a zombie\n");
  			break;
  		}

Modified: trunk/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_followme.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_followme.c (original)
+++ trunk/apps/app_followme.c Tue Mar 13 13:20:34 2012
@@ -645,7 +645,7 @@
 					tmpto = ast_sched_wait(ast_channel_sched(tmpuser->ochan));
 					if (tmpto > 0 && tmpto < to)
 						to = tmpto;
-					else if (tmpto < 0 && !tmpuser->ochan->timingfunc) {
+					else if (tmpto < 0 && !ast_channel_timingfunc(tmpuser->ochan)) {
 						ast_stopstream(tmpuser->ochan);
 						if (tmpuser->state == 1) {
 							ast_verb(3, "Playback of the call-from file appears to be done.\n");

Modified: trunk/apps/app_macro.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_macro.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Tue Mar 13 13:20:34 2012
@@ -373,8 +373,8 @@
 		argc++;
 	}
 	ast_channel_unlock(chan);
-	autoloopflag = ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP);
-	ast_set_flag(chan, AST_FLAG_IN_AUTOLOOP);
+	autoloopflag = ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP);
+	ast_set_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP);
 	while (ast_exists_extension(chan, ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan),
 		S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
 		struct ast_context *c;
@@ -512,7 +512,7 @@
 	/* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */
 	snprintf(depthc, sizeof(depthc), "%d", depth);
 	pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
-	ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
+	ast_set2_flag(ast_channel_flags(chan), autoloopflag, AST_FLAG_IN_AUTOLOOP);
 
   	for (x = 1; x < argc; x++) {
   		/* Restore old arguments and delete ours */

Modified: trunk/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_mixmonitor.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_mixmonitor.c (original)
+++ trunk/apps/app_mixmonitor.c Tue Mar 13 13:20:34 2012
@@ -375,7 +375,7 @@
 
 	ast_audiohook_attach(chan, audiohook);
 
-	if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
+	if (!res && ast_test_flag(ast_channel_flags(chan), AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
 		ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);	
 
 	return res;

Modified: trunk/apps/app_parkandannounce.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_parkandannounce.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_parkandannounce.c (original)
+++ trunk/apps/app_parkandannounce.c Tue Mar 13 13:20:34 2012
@@ -137,7 +137,7 @@
 	ast_verb(3, "Dial Tech,String: (%s,%s)\n", dialtech, args.dial);
 
 	if (!ast_strlen_zero(args.return_context)) {
-		ast_clear_flag(chan, AST_FLAG_IN_AUTOLOOP);
+		ast_clear_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP);
 		ast_parseable_goto(chan, args.return_context);
 	}
 

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue Mar 13 13:20:34 2012
@@ -3023,7 +3023,7 @@
 		/* Hangup any existing lines we have open */
 		if (outgoing->chan && (outgoing->chan != exception)) {
 			if (exception || cancel_answered_elsewhere)
-				ast_set_flag(outgoing->chan, AST_FLAG_ANSWERED_ELSEWHERE);
+				ast_set_flag(ast_channel_flags(outgoing->chan), AST_FLAG_ANSWERED_ELSEWHERE);
 			ast_hangup(outgoing->chan);
 		}
 		oo = outgoing;
@@ -3273,7 +3273,7 @@
 	ast_channel_lock_both(tmp->chan, qe->chan);
 
 	if (qe->cancel_answered_elsewhere) {
-		ast_set_flag(tmp->chan, AST_FLAG_ANSWERED_ELSEWHERE);
+		ast_set_flag(ast_channel_flags(tmp->chan), AST_FLAG_ANSWERED_ELSEWHERE);
 	}
 	ast_channel_appl_set(tmp->chan, "AppQueue");
 	ast_channel_data_set(tmp->chan, "(Outgoing Line)");
@@ -4646,7 +4646,7 @@
 	/* if the calling channel has the ANSWERED_ELSEWHERE flag set, make sure this is inherited. 
 		(this is mainly to support chan_local)
 	*/
-	if (ast_test_flag(qe->chan, AST_FLAG_ANSWERED_ELSEWHERE)) {
+	if (ast_test_flag(ast_channel_flags(qe->chan), AST_FLAG_ANSWERED_ELSEWHERE)) {
 		qe->cancel_answered_elsewhere = 1;
 	}
 

Modified: trunk/apps/app_speech_utils.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_speech_utils.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_speech_utils.c (original)
+++ trunk/apps/app_speech_utils.c Tue Mar 13 13:20:34 2012
@@ -721,7 +721,7 @@
 	/* Okay it's streaming so go into a loop grabbing frames! */
 	while (done == 0) {
 		/* If the filename is null and stream is not running, start up a new sound file */
-		if (!quieted && (ast_channel_streamid(chan) == -1 && chan->timingfunc == NULL) && (filename = strsep(&filename_tmp, "&"))) {
+		if (!quieted && (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL) && (filename = strsep(&filename_tmp, "&"))) {
 			/* Discard old stream information */
 			ast_stopstream(chan);
 			/* Start new stream */
@@ -769,7 +769,7 @@
 		switch (speech->state) {
 		case AST_SPEECH_STATE_READY:
 			/* If audio playback has stopped do a check for timeout purposes */
-			if (ast_channel_streamid(chan) == -1 && chan->timingfunc == NULL)
+			if (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL)
 				ast_stopstream(chan);
 			if (!quieted && ast_channel_stream(chan) == NULL && timeout && started == 0 && !filename_tmp) {
 				if (timeout == -1) {
@@ -795,7 +795,7 @@
 							speech_streamfile(chan, speech->processing_sound, ast_channel_language(chan));
 						}
 					}
-				} else if (ast_channel_streamid(chan) == -1 && chan->timingfunc == NULL) {
+				} else if (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL) {
 					ast_stopstream(chan);
 					if (speech->processing_sound != NULL) {
 						if (strlen(speech->processing_sound) > 0 && strcasecmp(speech->processing_sound, "none")) {

Modified: trunk/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_stack.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Tue Mar 13 13:20:34 2012
@@ -445,10 +445,10 @@
 	}
 
 	if (!ast_exists_extension(chan, ast_channel_context(chan), ast_channel_exten(chan),
-		ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan),
+		ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan),
 		S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
 		ast_log(LOG_ERROR, "Attempt to reach a non-existent destination for gosub: (Context:%s, Extension:%s, Priority:%d)\n",
-				ast_channel_context(chan), ast_channel_exten(chan), ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan));
+				ast_channel_context(chan), ast_channel_exten(chan), ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP) ? ast_channel_priority(chan) + 1 : ast_channel_priority(chan));
 		ast_channel_context_set(chan, newframe->context);
 		ast_channel_exten_set(chan, newframe->extension);
 		ast_channel_priority_set(chan, newframe->priority - 1);

Modified: trunk/apps/app_talkdetect.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_talkdetect.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/apps/app_talkdetect.c (original)
+++ trunk/apps/app_talkdetect.c Tue Mar 13 13:20:34 2012
@@ -151,7 +151,7 @@
 		detection_start = ast_tvnow();
 		while (ast_channel_stream(chan)) {
 			res = ast_sched_wait(ast_channel_sched(chan));
-			if ((res < 0) && !chan->timingfunc) {
+			if ((res < 0) && !ast_channel_timingfunc(chan)) {
 				res = 0;
 				break;
 			}

Modified: trunk/bridges/bridge_multiplexed.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_multiplexed.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/bridges/bridge_multiplexed.c (original)
+++ trunk/bridges/bridge_multiplexed.c Tue Mar 13 13:20:34 2012
@@ -236,11 +236,11 @@
 				}
 			}
 		}
-		if (winner && winner->bridge) {
-			struct ast_bridge *bridge = winner->bridge;
+		if (winner && ast_channel_internal_bridge(winner)) {
+			struct ast_bridge *bridge = ast_channel_internal_bridge(winner);
 			int stop = 0;
 			ao2_unlock(multiplexed_thread);
-			while ((bridge = winner->bridge) && ao2_trylock(bridge)) {
+			while ((bridge = ast_channel_internal_bridge(winner)) && ao2_trylock(bridge)) {
 				sched_yield();
 				if (multiplexed_thread->thread == AST_PTHREADT_STOP) {
 					stop = 1;

Modified: trunk/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_agent.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Tue Mar 13 13:20:34 2012
@@ -601,7 +601,7 @@
 		p->start = cur_time;
 	}
 	if (p->chan) {
-		ast_copy_flags(p->chan, ast, AST_FLAG_EXCEPTION);
+		ast_copy_flags(ast_channel_flags(p->chan), ast_channel_flags(ast), AST_FLAG_EXCEPTION);
 		ast_channel_fdno_set(p->chan, (ast_channel_fdno(ast) == AST_AGENT_FD) ? AST_TIMING_FD : ast_channel_fdno(ast));
 		f = ast_read(p->chan);
 	} else
@@ -609,7 +609,7 @@
 	if (!f) {
 		/* If there's a channel, make it NULL */
 		if (p->chan) {
-			p->chan->_bridge = NULL;
+			ast_channel_internal_bridged_channel_set(p->chan, NULL);
 			p->chan = NULL;
 			ast_devstate_changed(AST_DEVICE_UNAVAILABLE, "Agent/%s", p->agent);
 			p->acknowledged = 0;
@@ -697,11 +697,11 @@
 	}
 
 	CLEANUP(ast,p);
-	if (p->chan && !p->chan->_bridge) {
+	if (p->chan && !ast_channel_internal_bridged_channel(p->chan)) {
 		if (strcasecmp(ast_channel_tech(p->chan)->type, "Local")) {
-			p->chan->_bridge = ast;
+			ast_channel_internal_bridged_channel_set(p->chan, ast);
 			if (p->chan)
-				ast_debug(1, "Bridge on '%s' being set to '%s' (3)\n", ast_channel_name(p->chan), ast_channel_name(p->chan->_bridge));
+				ast_debug(1, "Bridge on '%s' being set to '%s' (3)\n", ast_channel_name(p->chan), ast_channel_name(ast_channel_internal_bridged_channel(p->chan)));
 		}
 	}
 	ast_mutex_unlock(&p->lock);
@@ -964,7 +964,7 @@
 	} else
 		p->start = 0;
 	if (p->chan) {
-		p->chan->_bridge = NULL;
+		ast_channel_internal_bridged_channel_set(p->chan, NULL);
 		/* If they're dead, go ahead and hang up on the agent now */
 		if (p->dead) {
 			ast_channel_lock(p->chan);
@@ -1083,8 +1083,8 @@
 
 	if (p) {
 		if (chan == p->chan)
-			ret = bridge->_bridge;
-		else if (chan == bridge->_bridge)
+			ret = ast_channel_internal_bridged_channel(bridge);
+		else if (chan == ast_channel_internal_bridged_channel(bridge))
 			ret = p->chan;
 	}
 
@@ -1586,7 +1586,7 @@
 
 		if (p->chan) {
 			loginChan = ast_strdupa(ast_channel_name(p->chan));
-			if (owner && owner->_bridge) {
+			if (owner && ast_channel_internal_bridged_channel(owner)) {
 				talkingto = S_COR(ast_channel_caller(p->chan)->id.number.valid,
 					ast_channel_caller(p->chan)->id.number.str, "n/a");
 				if ((bridge = ast_bridged_channel(owner))) {

Modified: trunk/channels/chan_bridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_bridge.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/channels/chan_bridge.c (original)
+++ trunk/channels/chan_bridge.c Tue Mar 13 13:20:34 2012
@@ -121,12 +121,12 @@
 	struct bridge_pvt *p = ast_channel_tech_pvt(ast);
 
 	/* If no bridge has been provided on the input channel, bail out */
-	if (!ast->bridge) {
+	if (!ast_channel_internal_bridge(ast)) {
 		return -1;
 	}
 
 	/* Impart the output channel upon the given bridge of the input channel */
-	ast_bridge_impart(p->input->bridge, p->output, NULL, NULL, 0);
+	ast_bridge_impart(ast_channel_internal_bridge(p->input), p->output, NULL, NULL, 0);
 
 	return 0;
 }

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Mar 13 13:20:34 2012
@@ -7741,7 +7741,7 @@
 	} else {
 		ast_debug(1, "Neither %s nor %s are in a bridge, nothing to transfer\n",
 			ast_channel_name(p->subs[SUB_REAL].owner), ast_channel_name(p->subs[SUB_THREEWAY].owner));
-		ast_channel_softhangup_internal_flag_set(p->subs[SUB_THREEWAY].owner, ast_channel_softhangup_internal_flag(p->subs[SUB_THREEWAY].owner) | AST_SOFTHANGUP_DEV);
+		ast_channel_softhangup_internal_flag_add(p->subs[SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 		return -1;
 	}
 	return 0;
@@ -9150,7 +9150,7 @@
 	readbuf = ((unsigned char *)p->subs[idx].buffer) + AST_FRIENDLY_OFFSET;
 	CHECK_BLOCKING(ast);
 	res = read(p->subs[idx].dfd, readbuf, p->subs[idx].linear ? READ_SIZE * 2 : READ_SIZE);
-	ast_clear_flag(ast, AST_FLAG_BLOCKING);
+	ast_clear_flag(ast_channel_flags(ast), AST_FLAG_BLOCKING);
 	/* Check for hangup */
 	if (res < 0) {
 		f = NULL;
@@ -10549,7 +10549,7 @@
 				 * emulation.  The DTMF digits can come so fast that emulation
 				 * can drop some of them.
 				 */
-				ast_set_flag(chan, AST_FLAG_END_DTMF_ONLY);
+				ast_set_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 				res = 4000;/* This is a typical OFF time between rings. */
 				for (;;) {
 					struct ast_frame *f;
@@ -10580,7 +10580,7 @@
 						ast_channel_state(chan) == AST_STATE_RINGING)
 						break; /* Got ring */
 				}
-				ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
+				ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
 				dtmfbuf[k] = '\0';
 				dahdi_setlinear(p->subs[idx].dfd, p->subs[idx].linear);
 				/* Got cid and ring. */

Modified: trunk/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_local.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Tue Mar 13 13:20:34 2012
@@ -339,8 +339,8 @@
 		/* Now see if the opposite channel is bridged to anything */
 		if (!bridged) {
 			bridged = bridge;
-		} else if (bridged->_bridge) {
-			bridged = bridged->_bridge;
+		} else if (ast_channel_internal_bridged_channel(bridged)) {
+			bridged = ast_channel_internal_bridged_channel(bridged);
 		}
 	}
 
@@ -502,7 +502,7 @@
 	/* since we had to unlock p to get the bridged chan, validate our
 	 * data once again and verify the bridged channel is what we expect
 	 * it to be in order to perform this optimization */
-	if (ast_test_flag(p, LOCAL_ALREADY_MASQED) || !p->owner || !p->chan || (p->chan->_bridge != bridged_chan)) {
+	if (ast_test_flag(p, LOCAL_ALREADY_MASQED) || !p->owner || !p->chan || (ast_channel_internal_bridged_channel(p->chan) != bridged_chan)) {
 		return;
 	}
 
@@ -511,24 +511,24 @@
 	   frames on the owner channel (because they would be transferred to the
 	   outbound channel during the masquerade)
 	*/
-	if (p->chan->_bridge /* Not ast_bridged_channel!  Only go one step! */ && AST_LIST_EMPTY(ast_channel_readq(p->owner))) {
+	if (ast_channel_internal_bridged_channel(p->chan) /* Not ast_bridged_channel!  Only go one step! */ && AST_LIST_EMPTY(ast_channel_readq(p->owner))) {
 		/* Masquerade bridged channel into owner */
 		/* Lock everything we need, one by one, and give up if
 		   we can't get everything.  Remember, we'll get another
 		   chance in just a little bit */
-		if (!ast_channel_trylock(p->chan->_bridge)) {
-			if (!ast_check_hangup(p->chan->_bridge)) {
+		if (!ast_channel_trylock(ast_channel_internal_bridged_channel(p->chan))) {
+			if (!ast_check_hangup(ast_channel_internal_bridged_channel(p->chan))) {
 				if (!ast_channel_trylock(p->owner)) {
 					if (!ast_check_hangup(p->owner)) {
-						if (ast_channel_monitor(p->owner) && !ast_channel_monitor(p->chan->_bridge)) {
+						if (ast_channel_monitor(p->owner) && !ast_channel_monitor(ast_channel_internal_bridged_channel(p->chan))) {
 							/* If a local channel is being monitored, we don't want a masquerade
 							 * to cause the monitor to go away. Since the masquerade swaps the monitors,
 							 * pre-swapping the monitors before the masquerade will ensure that the monitor
 							 * ends up where it is expected.
 							 */
 							tmp = ast_channel_monitor(p->owner);
-							ast_channel_monitor_set(p->owner, ast_channel_monitor(p->chan->_bridge));
-							ast_channel_monitor_set(p->chan->_bridge, tmp);
+							ast_channel_monitor_set(p->owner, ast_channel_monitor(ast_channel_internal_bridged_channel(p->chan)));
+							ast_channel_monitor_set(ast_channel_internal_bridged_channel(p->chan), tmp);
 						}
 						if (ast_channel_audiohooks(p->chan)) {
 							struct ast_audiohook_list *audiohooks_swapper;
@@ -547,26 +547,26 @@
 						if (ast_channel_caller(p->owner)->id.name.valid || ast_channel_caller(p->owner)->id.number.valid
 							|| ast_channel_caller(p->owner)->id.subaddress.valid || ast_channel_caller(p->owner)->ani.name.valid
 							|| ast_channel_caller(p->owner)->ani.number.valid || ast_channel_caller(p->owner)->ani.subaddress.valid) {
-							SWAP(*ast_channel_caller(p->owner), *ast_channel_caller(p->chan->_bridge));
+							SWAP(*ast_channel_caller(p->owner), *ast_channel_caller(ast_channel_internal_bridged_channel(p->chan)));
 						}
 						if (ast_channel_redirecting(p->owner)->from.name.valid || ast_channel_redirecting(p->owner)->from.number.valid
 							|| ast_channel_redirecting(p->owner)->from.subaddress.valid || ast_channel_redirecting(p->owner)->to.name.valid
 							|| ast_channel_redirecting(p->owner)->to.number.valid || ast_channel_redirecting(p->owner)->to.subaddress.valid) {
-							SWAP(*ast_channel_redirecting(p->owner), *ast_channel_redirecting(p->chan->_bridge));
+							SWAP(*ast_channel_redirecting(p->owner), *ast_channel_redirecting(ast_channel_internal_bridged_channel(p->chan)));
 						}
 						if (ast_channel_dialed(p->owner)->number.str || ast_channel_dialed(p->owner)->subaddress.valid) {
-							SWAP(*ast_channel_dialed(p->owner), *ast_channel_dialed(p->chan->_bridge));
+							SWAP(*ast_channel_dialed(p->owner), *ast_channel_dialed(ast_channel_internal_bridged_channel(p->chan)));
 						}
 
 
 						ast_app_group_update(p->chan, p->owner);
-						ast_channel_masquerade(p->owner, p->chan->_bridge);
+						ast_channel_masquerade(p->owner, ast_channel_internal_bridged_channel(p->chan));
 						ast_set_flag(p, LOCAL_ALREADY_MASQED);
 					}
 					ast_channel_unlock(p->owner);
 				}
 			}
-			ast_channel_unlock(p->chan->_bridge);
+			ast_channel_unlock(ast_channel_internal_bridged_channel(p->chan));
 		}
 	}
 }
@@ -629,7 +629,7 @@
 	}
 
 	/* Do not let a masquerade cause a Local channel to be bridged to itself! */
-	if (!ast_check_hangup(newchan) && ((p->owner && p->owner->_bridge == p->chan) || (p->chan && p->chan->_bridge == p->owner))) {
+	if (!ast_check_hangup(newchan) && ((p->owner && ast_channel_internal_bridged_channel(p->owner) == p->chan) || (p->chan && ast_channel_internal_bridged_channel(p->chan) == p->owner))) {
 		ast_log(LOG_WARNING, "You can not bridge a Local channel to itself!\n");
 		ao2_unlock(p);
 		ast_queue_hangup(newchan);
@@ -859,8 +859,8 @@
 	ast_channel_cc_params_init(chan, ast_channel_get_cc_config_params(owner));
 
 	/* Make sure we inherit the ANSWERED_ELSEWHERE flag if it's set on the queue/dial call request in the dialplan */
-	if (ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE)) {
-		ast_set_flag(chan, AST_FLAG_ANSWERED_ELSEWHERE);
+	if (ast_test_flag(ast_channel_flags(ast), AST_FLAG_ANSWERED_ELSEWHERE)) {
+		ast_set_flag(ast_channel_flags(chan), AST_FLAG_ANSWERED_ELSEWHERE);
 	}
 
 	/* copy the channel variables from the incoming channel to the outgoing channel */
@@ -980,8 +980,8 @@
 
 	isoutbound = IS_OUTBOUND(ast, p); /* just comparing pointer of ast */
 
-	if (p->chan && ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE)) {
-		ast_set_flag(p->chan, AST_FLAG_ANSWERED_ELSEWHERE);
+	if (p->chan && ast_test_flag(ast_channel_flags(ast), AST_FLAG_ANSWERED_ELSEWHERE)) {
+		ast_set_flag(ast_channel_flags(p->chan), AST_FLAG_ANSWERED_ELSEWHERE);
 		ast_debug(2, "This local call has the ANSWERED_ELSEWHERE flag set.\n");
 	}
 

Modified: trunk/channels/chan_phone.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_phone.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/channels/chan_phone.c (original)
+++ trunk/channels/chan_phone.c Tue Mar 13 13:20:34 2012
@@ -563,7 +563,7 @@
 	/* Try to read some data... */
 	CHECK_BLOCKING(ast);
 	res = read(p->fd, p->buf, PHONE_MAX_BUF);
-	ast_clear_flag(ast, AST_FLAG_BLOCKING);
+	ast_clear_flag(ast_channel_flags(ast), AST_FLAG_BLOCKING);
 	if (res < 0) {
 #if 0
 		if (errno == EAGAIN) {

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Mar 13 13:20:34 2012
@@ -6328,7 +6328,7 @@
 		ast_debug(1, "Asked to hangup channel that was not connected\n");
 		return 0;
 	}
-	if (ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE) || ast_channel_hangupcause(ast) == AST_CAUSE_ANSWERED_ELSEWHERE) {
+	if (ast_test_flag(ast_channel_flags(ast), AST_FLAG_ANSWERED_ELSEWHERE) || ast_channel_hangupcause(ast) == AST_CAUSE_ANSWERED_ELSEWHERE) {
 		ast_debug(1, "This call was answered elsewhere");
 		if (ast_channel_hangupcause(ast) == AST_CAUSE_ANSWERED_ELSEWHERE) {
 			ast_debug(1, "####### It's the cause code, buddy. The cause code!!!\n");
@@ -6358,7 +6358,7 @@
 		return 0;
 	}
 
-	if (ast_test_flag(ast, AST_FLAG_ZOMBIE)) {
+	if (ast_test_flag(ast_channel_flags(ast), AST_FLAG_ZOMBIE)) {
 		if (p->refer)
 			ast_debug(1, "SIP Transfer: Hanging up Zombie channel %s after transfer ... Call-ID: %s\n", ast_channel_name(ast), p->callid);
 		else
@@ -6690,9 +6690,9 @@
 	int ret = -1;
 	struct sip_pvt *p;
 
-	if (newchan && ast_test_flag(newchan, AST_FLAG_ZOMBIE))
+	if (newchan && ast_test_flag(ast_channel_flags(newchan), AST_FLAG_ZOMBIE))
 		ast_debug(1, "New channel is zombie\n");
-	if (oldchan && ast_test_flag(oldchan, AST_FLAG_ZOMBIE))
+	if (oldchan && ast_test_flag(ast_channel_flags(oldchan), AST_FLAG_ZOMBIE))
 		ast_debug(1, "Old channel is zombie\n");
 
 	if (!newchan || !ast_channel_tech_pvt(newchan)) {
@@ -22415,7 +22415,7 @@
 static void ast_quiet_chan(struct ast_channel *chan)
 {
 	if (chan && ast_channel_state(chan) == AST_STATE_UP) {
-		if (ast_test_flag(chan, AST_FLAG_MOH))
+		if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH))
 			ast_moh_stop(chan);
 		else if (ast_channel_generatordata(chan))
 			ast_deactivate_generator(chan);

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Tue Mar 13 13:20:34 2012
@@ -2306,7 +2306,7 @@
 static void unistim_quiet_chan(struct ast_channel *chan)
 {
 	if (chan && ast_channel_state(chan) == AST_STATE_UP) {
-		if (ast_test_flag(chan, AST_FLAG_MOH)) {
+		if (ast_test_flag(ast_channel_flags(chan), AST_FLAG_MOH)) {
 			ast_moh_stop(chan);
 		} else if (ast_channel_generatordata(chan)) {
 			ast_deactivate_generator(chan);
@@ -2959,11 +2959,11 @@
 /* Step 1 : Music On Hold for peer, Dialing screen for us */
 static void transfer_call_step1(struct unistimsession *pte)
 {
-	struct unistim_subchannel *sub, *sub_trans;
+	struct unistim_subchannel *sub /*, *sub_trans */;
 	struct unistim_device *d = pte->device;
 
 	sub = get_sub(d, SUB_REAL);
-	sub_trans = get_sub(d, SUB_THREEWAY);
+	/* sub_trans = get_sub(d, SUB_THREEWAY); */
 
 	if (!sub || !sub->owner) {
 		ast_log(LOG_WARNING, "Unable to find subchannel for music on hold\n");
@@ -4856,7 +4856,7 @@
 	refresh_all_favorite(s); /* Update favicons in case of DND keys */
 	if (s->state == STATE_RINGING && sub->subtype == SUB_RING) {
 		send_no_ring(s);
-		if (!ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE) && ast_channel_hangupcause(ast) != AST_CAUSE_ANSWERED_ELSEWHERE) {
+		if (!ast_test_flag(ast_channel_flags(ast), AST_FLAG_ANSWERED_ELSEWHERE) && ast_channel_hangupcause(ast) != AST_CAUSE_ANSWERED_ELSEWHERE) {
 			d->missed_call++;
 			write_history(s, 'i', 1);
 		}
@@ -5872,7 +5872,7 @@
 			if (!sub->owner) {
 				tmp = (void *) -42;
 			} else {
-				tmp = sub->owner->_bridge;
+				tmp = ast_channel_internal_bridged_channel(sub->owner);
 			}
 			ast_cli(a->fd,
 					"-->subtype=%s chan=%p rtp=%p bridge=%p line=%p alreadygone=%d softkey=%d\n",

Modified: trunk/channels/chan_vpb.cc
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_vpb.cc?view=diff&rev=358907&r1=358906&r2=358907
==============================================================================
--- trunk/channels/chan_vpb.cc (original)
+++ trunk/channels/chan_vpb.cc Tue Mar 13 13:20:34 2012
@@ -2257,8 +2257,8 @@
 				bridgerec = 0;
 		} else {
 			ast_verb(5, "%s: chanreads: No native bridge.\n", p->dev);
-			if (p->owner->_bridge) {

[... 3162 lines stripped ...]



More information about the asterisk-commits mailing list