[asterisk-commits] twilson: trunk r357721 - in /trunk: addons/ apps/ channels/ funcs/ include/as...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 1 16:09:27 CST 2012


Author: twilson
Date: Thu Mar  1 16:09:18 2012
New Revision: 357721

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=357721
Log:
Opaquify ast_channel typedefs, fd arrays, and softhangup flag

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

Modified:
    trunk/addons/chan_ooh323.c
    trunk/apps/app_dahdibarge.c
    trunk/apps/app_dahdiras.c
    trunk/apps/app_directed_pickup.c
    trunk/apps/app_dumpchan.c
    trunk/apps/app_flash.c
    trunk/apps/app_meetme.c
    trunk/apps/app_queue.c
    trunk/channels/chan_agent.c
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_gtalk.c
    trunk/channels/chan_h323.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_jingle.c
    trunk/channels/chan_mgcp.c
    trunk/channels/chan_misdn.c
    trunk/channels/chan_phone.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_skinny.c
    trunk/channels/chan_unistim.c
    trunk/channels/chan_vpb.cc
    trunk/channels/console_video.c
    trunk/channels/sig_analog.c
    trunk/channels/sig_pri.c
    trunk/channels/sig_ss7.c
    trunk/funcs/func_channel.c
    trunk/include/asterisk/channel.h
    trunk/main/autoservice.c
    trunk/main/channel.c
    trunk/main/channel_internal_api.c
    trunk/main/cli.c
    trunk/main/dsp.c
    trunk/main/features.c
    trunk/main/file.c
    trunk/main/pbx.c
    trunk/res/snmp/agent.c

Modified: trunk/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/addons/chan_ooh323.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/addons/chan_ooh323.c (original)
+++ trunk/addons/chan_ooh323.c Thu Mar  1 16:09:18 2012
@@ -2155,7 +2155,7 @@
 
 			ast_set_flag(p, H323_ALREADYGONE);
 			ast_channel_hangupcause_set(p->owner, call->q931cause);
-			p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+			ast_channel_softhangup_internal_flag_add(p->owner, AST_SOFTHANGUP_DEV);
 			ast_queue_hangup_with_cause(p->owner,call->q931cause);
 		}
    	}

Modified: trunk/apps/app_dahdibarge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dahdibarge.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/apps/app_dahdibarge.c (original)
+++ trunk/apps/app_dahdibarge.c Thu Mar  1 16:09:18 2012
@@ -129,7 +129,7 @@
 	ast_indicate(chan, -1);
 	retrydahdi = strcasecmp(ast_channel_tech(chan)->type, "DAHDI");
 dahdiretry:
-	origfd = chan->fds[0];
+	origfd = ast_channel_fd(chan, 0);
 	if (retrydahdi) {
 		fd = open("/dev/dahdi/pseudo", O_RDWR);
 		if (fd < 0) {
@@ -162,7 +162,7 @@
 		nfds = 1;
 	} else {
 		/* XXX Make sure we're not running on a pseudo channel XXX */
-		fd = chan->fds[0];
+		fd = ast_channel_fd(chan, 0);
 		nfds = 0;
 	}
 	memset(&dahdic, 0, sizeof(dahdic));
@@ -199,7 +199,7 @@
 		ms = -1;
 		c = ast_waitfor_nandfds(&chan, 1, &fd, nfds, NULL, &outfd, &ms);
 		if (c) {
-			if (c->fds[0] != origfd) {
+			if (ast_channel_fd(c, 0) != origfd) {
 				if (retrydahdi) {
 					/* Kill old pseudo */
 					close(fd);
@@ -215,7 +215,7 @@
 				ret = 0;
 				ast_frfree(f);
 				break;
-			} else if (fd != chan->fds[0]) {
+			} else if (fd != ast_channel_fd(chan, 0)) {
 				if (f->frametype == AST_FRAME_VOICE) {
 					if (f->subclass.format.id == AST_FORMAT_ULAW) {
 						/* Carefully write */
@@ -243,7 +243,7 @@
 				ast_log(LOG_WARNING, "Failed to read frame: %s\n", strerror(errno));
 		}
 	}
-	if (fd != chan->fds[0])
+	if (fd != ast_channel_fd(chan, 0))
 		close(fd);
 	else {
 		/* Take out of conference */

Modified: trunk/apps/app_dahdiras.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dahdiras.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/apps/app_dahdiras.c (original)
+++ trunk/apps/app_dahdiras.c Thu Mar  1 16:09:18 2012
@@ -95,7 +95,7 @@
 	}
 
 	/* Execute RAS on File handles */
-	dup2(chan->fds[0], STDIN_FILENO);
+	dup2(ast_channel_fd(chan, 0), STDIN_FILENO);
 
 	/* Drop high priority */
 	if (ast_opt_high_priority)
@@ -139,7 +139,7 @@
 	struct dahdi_bufferinfo savebi;
 	int x;
 	
-	res = ioctl(chan->fds[0], DAHDI_GET_BUFINFO, &savebi);
+	res = ioctl(ast_channel_fd(chan, 0), DAHDI_GET_BUFINFO, &savebi);
 	if(res) {
 		ast_log(LOG_WARNING, "Unable to check buffer policy on channel %s\n", ast_channel_name(chan));
 		return;
@@ -175,10 +175,10 @@
 			}
 			/* Throw back into audio mode */
 			x = 1;
-			ioctl(chan->fds[0], DAHDI_AUDIOMODE, &x);
+			ioctl(ast_channel_fd(chan, 0), DAHDI_AUDIOMODE, &x);
 
 			/* Restore saved values */
-			res = ioctl(chan->fds[0], DAHDI_SET_BUFINFO, &savebi);
+			res = ioctl(ast_channel_fd(chan, 0), DAHDI_SET_BUFINFO, &savebi);
 			if (res < 0) {
 				ast_log(LOG_WARNING, "Unable to set buffer policy on channel %s\n", ast_channel_name(chan));
 			}
@@ -209,7 +209,7 @@
 		sleep(2);
 	} else {
 		memset(&dahdip, 0, sizeof(dahdip));
-		if (ioctl(chan->fds[0], DAHDI_GET_PARAMS, &dahdip)) {
+		if (ioctl(ast_channel_fd(chan, 0), DAHDI_GET_PARAMS, &dahdip)) {
 			ast_log(LOG_WARNING, "Unable to get DAHDI parameters\n");
 		} else if (dahdip.sigtype != DAHDI_SIG_CLEAR) {
 			ast_verb(2, "Channel %s is not a clear channel\n", ast_channel_name(chan));

Modified: trunk/apps/app_directed_pickup.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_directed_pickup.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/apps/app_directed_pickup.c (original)
+++ trunk/apps/app_directed_pickup.c Thu Mar  1 16:09:18 2012
@@ -241,7 +241,7 @@
 	struct ast_channel *chan = data;/*!< Channel wanting to pickup call */
 
 	ast_channel_lock(target);
-	if (chan != target && (chan->pickupgroup & target->callgroup)
+	if (chan != target && (ast_channel_pickupgroup(chan) & ast_channel_callgroup(target))
 		&& ast_can_pickup(target)) {
 		/* Return with the channel still locked on purpose */
 		return CMP_MATCH | CMP_STOP;

Modified: trunk/apps/app_dumpchan.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dumpchan.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/apps/app_dumpchan.c (original)
+++ trunk/apps/app_dumpchan.c Thu Mar  1 16:09:18 2012
@@ -151,7 +151,7 @@
 		ast_translate_path_to_str(ast_channel_writetrans(c), &write_transpath),
 		ast_channel_readtrans(c) ? "Yes" : "No",
 		ast_translate_path_to_str(ast_channel_readtrans(c), &read_transpath),
-		c->fds[0],
+		ast_channel_fd(c, 0),
 		ast_channel_fin(c) & ~DEBUGCHAN_FLAG, (ast_channel_fin(c) & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
 		ast_channel_fout(c) & ~DEBUGCHAN_FLAG, (ast_channel_fout(c) & DEBUGCHAN_FLAG) ? " (DEBUGGED)" : "",
 		(long)ast_channel_whentohangup(c)->tv_sec,
@@ -163,8 +163,8 @@
 		ast_channel_context(c),
 		ast_channel_exten(c),
 		ast_channel_priority(c),
-		ast_print_group(cgrp, sizeof(cgrp), c->callgroup),
-		ast_print_group(pgrp, sizeof(pgrp), c->pickupgroup),
+		ast_print_group(cgrp, sizeof(cgrp), ast_channel_callgroup(c)),
+		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)"));

Modified: trunk/apps/app_flash.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_flash.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/apps/app_flash.c (original)
+++ trunk/apps/app_flash.c Thu Mar  1 16:09:18 2012
@@ -85,15 +85,15 @@
 	}
 	
 	memset(&dahdip, 0, sizeof(dahdip));
-	res = ioctl(chan->fds[0], DAHDI_GET_PARAMS, &dahdip);
+	res = ioctl(ast_channel_fd(chan, 0), DAHDI_GET_PARAMS, &dahdip);
 	if (!res) {
 		if (dahdip.sigtype & __DAHDI_SIG_FXS) {
 			x = DAHDI_FLASH;
-			res = ioctl(chan->fds[0], DAHDI_HOOK, &x);
+			res = ioctl(ast_channel_fd(chan, 0), DAHDI_HOOK, &x);
 			if (!res || (errno == EINPROGRESS)) {
 				if (res) {
 					/* Wait for the event to finish */
-					dahdi_wait_event(chan->fds[0]);
+					dahdi_wait_event(ast_channel_fd(chan, 0));
 				}
 				res = ast_safe_sleep(chan, 1000);
 				ast_verb(3, "Flashed channel %s\n", ast_channel_name(chan));

Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Thu Mar  1 16:09:18 2012
@@ -1286,7 +1286,7 @@
 		dahdic.chan = 0;
 		dahdic.confno = cnf->dahdiconf;
 		dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
-		if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &dahdic)) {
+		if (ioctl(ast_channel_fd(cnf->chan, 0), DAHDI_SETCONF, &dahdic)) {
 			if (test) {
 				ast_test_status_update(test, "Error setting conference on pseudo channel\n");
 			}
@@ -2439,7 +2439,7 @@
 		dahdic.chan = 0;
 		dahdic.confno = conf->dahdiconf;
 		dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
-		if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &dahdic)) {
+		if (ioctl(ast_channel_fd(conf->lchan, 0), DAHDI_SETCONF, &dahdic)) {
 			ast_log(LOG_WARNING, "Error starting listen channel\n");
 			ast_hangup(conf->lchan);
 			conf->lchan = NULL;
@@ -2681,7 +2681,7 @@
 	user->dahdichannel = !retrydahdi;
 
  dahdiretry:
-	origfd = chan->fds[0];
+	origfd = ast_channel_fd(chan, 0);
 	if (retrydahdi) {
 		/* open pseudo in non-blocking mode */
 		fd = open("/dev/dahdi/pseudo", O_RDWR | O_NONBLOCK);
@@ -2710,7 +2710,7 @@
 		nfds = 1;
 	} else {
 		/* XXX Make sure we're not running on a pseudo channel XXX */
-		fd = chan->fds[0];
+		fd = ast_channel_fd(chan, 0);
 		nfds = 0;
 	}
 	memset(&dahdic, 0, sizeof(dahdic));
@@ -3218,7 +3218,7 @@
 			if (c) {
 				char dtmfstr[2] = "";
 
-				if (c->fds[0] != origfd || (user->dahdichannel && (ast_channel_audiohooks(c) || ast_channel_monitor(c)))) {
+				if (ast_channel_fd(c, 0) != origfd || (user->dahdichannel && (ast_channel_audiohooks(c) || ast_channel_monitor(c)))) {
 					if (using_pseudo) {
 						/* Kill old pseudo */
 						close(fd);
@@ -3420,7 +3420,7 @@
 										dahdic.chan = 0;
 										dahdic.confno = conf->dahdiconf;
 										dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
-										if (ioctl(conf->lchan->fds[0], DAHDI_SETCONF, &dahdic)) {
+										if (ioctl(ast_channel_fd(conf->lchan, 0), DAHDI_SETCONF, &dahdic)) {
 											ast_log(LOG_WARNING, "Error starting listen channel\n");
 											ast_hangup(conf->lchan);
 											conf->lchan = NULL;

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Thu Mar  1 16:09:18 2012
@@ -5191,7 +5191,7 @@
 			struct ast_datastore *tds;
 
 			/* detect a blind transfer */
-			if (!(qe->chan->_softhangup | peer->_softhangup) && (strcasecmp(oldcontext, ast_channel_context(qe->chan)) || strcasecmp(oldexten, ast_channel_exten(qe->chan)))) {
+			if (!(ast_channel_softhangup_internal_flag(qe->chan) | ast_channel_softhangup_internal_flag(peer)) && (strcasecmp(oldcontext, ast_channel_context(qe->chan)) || strcasecmp(oldexten, ast_channel_exten(qe->chan)))) {
 				ast_queue_log(queuename, ast_channel_uniqueid(qe->chan), member->membername, "TRANSFER", "%s|%s|%ld|%ld|%d",
 					ast_channel_exten(qe->chan), ast_channel_context(qe->chan), (long) (callstart - qe->start),
 					(long) (time(NULL) - callstart), qe->opos);

Modified: trunk/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_agent.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Thu Mar  1 16:09:18 2012
@@ -321,11 +321,12 @@
 #define CLEANUP(ast, p) do { \
 	int x; \
 	if (p->chan) { \
-		for (x=0;x<AST_MAX_FDS;x++) {\
-			if (x != AST_TIMING_FD) \
-				ast_channel_set_fd(ast, x, p->chan->fds[x]); \
+		for (x = 0; x < AST_MAX_FDS; x++) { \
+			if (x != AST_TIMING_FD) { \
+				ast_channel_set_fd(ast, x, ast_channel_fd(p->chan, x)); \
+			} \
 		} \
-		ast_channel_set_fd(ast, AST_AGENT_FD, p->chan->fds[AST_TIMING_FD]); \
+		ast_channel_set_fd(ast, AST_AGENT_FD, ast_channel_fd(p->chan, AST_TIMING_FD)); \
 	} \
 } while(0)
 

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Thu Mar  1 16:09:18 2012
@@ -3078,7 +3078,7 @@
 	old_chan->owner = NULL;
 	if (new_chan->owner) {
 		ast_channel_tech_pvt_set(new_chan->owner, new_chan);
-		new_chan->owner->fds[0] = new_chan->subs[SUB_REAL].dfd;
+		ast_channel_fd_set(new_chan->owner, 0, new_chan->subs[SUB_REAL].dfd);
 		new_chan->subs[SUB_REAL].owner = old_chan->subs[SUB_REAL].owner;
 		old_chan->subs[SUB_REAL].owner = NULL;
 	}
@@ -3936,7 +3936,7 @@
 	ast_log(LOG_ERROR, "MFC/R2 protocol error on chan %d: %s\n", openr2_chan_get_number(r2chan), openr2_proto_get_error(reason));
 	if (p->owner) {
 		ast_channel_hangupcause_set(p->owner, AST_CAUSE_PROTOCOL_ERROR);
-		p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+		ast_channel_softhangup_internal_flag_add(p->owner, AST_SOFTHANGUP_DEV);
 	}
 	ast_mutex_lock(&p->lock);
 	p->mfcr2call = 0;
@@ -4110,7 +4110,7 @@
 	/* when we have an owner we don't call dahdi_r2_disconnect_call here, that will
 	   be done in dahdi_hangup */
 	if (ast_channel_state(p->owner) == AST_STATE_UP) {
-		p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+		ast_channel_softhangup_internal_flag_add(p->owner, AST_SOFTHANGUP_DEV);
 		ast_mutex_unlock(&p->lock);
 	} else if (openr2_chan_get_direction(r2chan) == OR2_DIR_FORWARD) {
 		/* being the forward side we must report what happened to the call to whoever requested it */
@@ -4127,7 +4127,7 @@
 			p->subs[SUB_REAL].needcongestion = 1;
 			break;
 		default:
-			p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+			ast_channel_softhangup_internal_flag_add(p->owner, AST_SOFTHANGUP_DEV);
 		}
 		ast_mutex_unlock(&p->lock);
 	} else {
@@ -7297,8 +7297,8 @@
 
 	op0 = p0 = ast_channel_tech_pvt(c0);
 	op1 = p1 = ast_channel_tech_pvt(c1);
-	ofd0 = c0->fds[0];
-	ofd1 = c1->fds[0];
+	ofd0 = ast_channel_fd(c0, 0);
+	ofd1 = ast_channel_fd(c1, 0);
 	oc0 = p0->owner;
 	oc1 = p1->owner;
 
@@ -7503,8 +7503,8 @@
 		if (!timeoutms ||
 			(op0 != p0) ||
 			(op1 != p1) ||
-			(ofd0 != c0->fds[0]) ||
-			(ofd1 != c1->fds[0]) ||
+			(ofd0 != ast_channel_fd(c0, 0)) ||
+			(ofd1 != ast_channel_fd(c1, 0)) ||
 			(p0->subs[SUB_REAL].owner && (os0 > -1) && (os0 != ast_channel_state(p0->subs[SUB_REAL].owner))) ||
 			(p1->subs[SUB_REAL].owner && (os1 > -1) && (os1 != ast_channel_state(p1->subs[SUB_REAL].owner))) ||
 			(oc0 != p0->owner) ||
@@ -7730,7 +7730,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));
-		p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV;
+		ast_channel_softhangup_internal_flag_set(p->subs[SUB_THREEWAY].owner, ast_channel_softhangup_internal_flag(p->subs[SUB_THREEWAY].owner) | AST_SOFTHANGUP_DEV);
 		return -1;
 	}
 	return 0;
@@ -8208,7 +8208,7 @@
 						   hanging up.  Hangup both channels now */
 						if (p->subs[SUB_THREEWAY].owner)
 							ast_queue_hangup_with_cause(p->subs[SUB_THREEWAY].owner, AST_CAUSE_NO_ANSWER);
-						p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV;
+						ast_channel_softhangup_internal_flag_add(p->subs[SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 						ast_debug(1, "Looks like a bounced flash, hanging up both calls on %d\n", p->channel);
 						ast_channel_unlock(p->subs[SUB_THREEWAY].owner);
 					} else if ((ast_channel_pbx(ast)) || (ast_channel_state(ast) == AST_STATE_UP)) {
@@ -8226,7 +8226,7 @@
 								dahdi_ring_phone(p);
 							} else {
 								if ((res = attempt_transfer(p)) < 0) {
-									p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV;
+									ast_channel_softhangup_internal_flag_add(p->subs[SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 									if (p->subs[SUB_THREEWAY].owner)
 										ast_channel_unlock(p->subs[SUB_THREEWAY].owner);
 								} else if (res) {
@@ -8237,7 +8237,7 @@
 								}
 							}
 						} else {
-							p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV;
+							ast_channel_softhangup_internal_flag_add(p->subs[SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 							if (p->subs[SUB_THREEWAY].owner)
 								ast_channel_unlock(p->subs[SUB_THREEWAY].owner);
 						}
@@ -8614,7 +8614,7 @@
 					}
 					/* Drop the last call and stop the conference */
 					ast_verb(3, "Dropping three-way call on %s\n", ast_channel_name(p->subs[SUB_THREEWAY].owner));
-					p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV;
+					ast_channel_softhangup_internal_flag_add(p->subs[SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 					p->subs[SUB_REAL].inthreeway = 0;
 					p->subs[SUB_THREEWAY].inthreeway = 0;
 				} else {
@@ -8640,7 +8640,7 @@
 					} else {
 						ast_verb(3, "Dumping incomplete call on on %s\n", ast_channel_name(p->subs[SUB_THREEWAY].owner));
 						swap_subs(p, SUB_THREEWAY, SUB_REAL);
-						p->subs[SUB_THREEWAY].owner->_softhangup |= AST_SOFTHANGUP_DEV;
+						ast_channel_softhangup_internal_flag_add(p->subs[SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
 						p->owner = p->subs[SUB_REAL].owner;
 						if (p->subs[SUB_REAL].owner && ast_bridged_channel(p->subs[SUB_REAL].owner))
 							ast_queue_control(p->subs[SUB_REAL].owner, AST_CONTROL_UNHOLD);
@@ -8895,7 +8895,7 @@
 		return f;
 	}
 	if (!(p->radio || (p->oprmode < 0)))
-		ast_debug(1, "Exception on %d, channel %d\n", ast->fds[0],p->channel);
+		ast_debug(1, "Exception on %d, channel %d\n", ast_channel_fd(ast, 0), p->channel);
 	/* If it's not us, return NULL immediately */
 	if (ast != p->owner) {
 		ast_log(LOG_WARNING, "We're %s, not %s\n", ast_channel_name(ast), ast_channel_name(p->owner));
@@ -9738,8 +9738,8 @@
 	ast_channel_tech_pvt_set(tmp, i);
 	if ((i->sig == SIG_FXOKS) || (i->sig == SIG_FXOGS) || (i->sig == SIG_FXOLS)) {
 		/* Only FXO signalled stuff can be picked up */
-		tmp->callgroup = i->callgroup;
-		tmp->pickupgroup = i->pickupgroup;
+		ast_channel_callgroup_set(tmp, i->callgroup);
+		ast_channel_pickupgroup_set(tmp, i->pickupgroup);
 	}
 	if (!ast_strlen_zero(i->parkinglot))
 		ast_channel_parkinglot_set(tmp, i->parkinglot);

Modified: trunk/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_gtalk.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Thu Mar  1 16:09:18 2012
@@ -1176,8 +1176,8 @@
 	ast_format_copy(ast_channel_rawreadformat(tmp), &tmpfmt);
 	ast_channel_tech_pvt_set(tmp, i);
 
-	tmp->callgroup = client->callgroup;
-	tmp->pickupgroup = client->pickupgroup;
+	ast_channel_callgroup_set(tmp, client->callgroup);
+	ast_channel_pickupgroup_set(tmp, client->pickupgroup);
 	ast_channel_caller(tmp)->id.name.presentation = client->callingpres;
 	ast_channel_caller(tmp)->id.number.presentation = client->callingpres;
 	if (!ast_strlen_zero(client->accountcode))

Modified: trunk/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_h323.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Thu Mar  1 16:09:18 2012
@@ -352,7 +352,7 @@
 	if (pvt->needhangup) {
 		if (h323debug)
 			ast_debug(1, "Process pending hangup for %s\n", ast_channel_name(c));
-		c->_softhangup |= AST_SOFTHANGUP_DEV;
+		ast_channel_softhangup_internal_flag_add(c, AST_SOFTHANGUP_DEV);
 		ast_channel_hangupcause_set(c, pvt->hangupcause);
 		ast_queue_hangup_with_cause(c, pvt->hangupcause);
 		pvt->needhangup = 0;
@@ -2456,7 +2456,7 @@
 	pvt->alreadygone = 1;
 	/* Send hangup */
 	if (pvt->owner) {
-		pvt->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+		ast_channel_softhangup_internal_flag_add(pvt->owner, AST_SOFTHANGUP_DEV);
 		ast_queue_hangup(pvt->owner);
 		ast_channel_unlock(pvt->owner);
 	}
@@ -2480,7 +2480,7 @@
 		return;
 	}
 	if (pvt->owner && !ast_channel_trylock(pvt->owner)) {
-		pvt->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+		ast_channel_softhangup_internal_flag_add(pvt->owner, AST_SOFTHANGUP_DEV);
 		ast_channel_hangupcause_set(pvt->owner, pvt->hangupcause = cause);
 		ast_queue_hangup_with_cause(pvt->owner, cause);
 		ast_channel_unlock(pvt->owner);

Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Thu Mar  1 16:09:18 2012
@@ -5547,8 +5547,8 @@
 			if (ast_tvzero(waittimer)) {
 				waittimer = now;
 			} else if (now.tv_sec - waittimer.tv_sec > IAX_LINGER_TIMEOUT) {
-				c0->_softhangup |= AST_SOFTHANGUP_DEV;
-				c1->_softhangup |= AST_SOFTHANGUP_DEV;
+				ast_channel_softhangup_internal_flag_add(c0, AST_SOFTHANGUP_DEV);
+				ast_channel_softhangup_internal_flag_add(c1, AST_SOFTHANGUP_DEV);
 				*fo = NULL;
 				*rc = c0;
 				res = AST_BRIDGE_COMPLETE;

Modified: trunk/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_jingle.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_jingle.c (original)
+++ trunk/channels/chan_jingle.c Thu Mar  1 16:09:18 2012
@@ -888,8 +888,8 @@
 	ast_format_copy(ast_channel_rawreadformat(tmp), &tmpfmt);
 	ast_channel_tech_pvt_set(tmp, i);
 
-	tmp->callgroup = client->callgroup;
-	tmp->pickupgroup = client->pickupgroup;
+	ast_channel_callgroup_set(tmp, client->callgroup);
+	ast_channel_pickupgroup_set(tmp, client->pickupgroup);
 	ast_channel_caller(tmp)->id.name.presentation = client->callingpres;
 	ast_channel_caller(tmp)->id.number.presentation = client->callingpres;
 	if (!ast_strlen_zero(client->accountcode))

Modified: trunk/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Thu Mar  1 16:09:18 2012
@@ -1531,8 +1531,8 @@
 			ast_channel_amaflags_set(tmp, i->amaflags);
 		sub->owner = tmp;
 		ast_module_ref(ast_module_info->self);
-		tmp->callgroup = i->callgroup;
-		tmp->pickupgroup = i->pickupgroup;
+		ast_channel_callgroup_set(tmp, i->callgroup);
+		ast_channel_pickupgroup_set(tmp, i->pickupgroup);
 		ast_channel_call_forward_set(tmp, i->call_forward);
 		ast_channel_context_set(tmp, i->context);
 		ast_channel_exten_set(tmp, i->exten);
@@ -3258,7 +3258,7 @@
 	} else {
 		ast_debug(1, "Neither %s nor %s are in a bridge, nothing to transfer\n",
 			ast_channel_name(p->sub->owner), ast_channel_name(p->sub->next->owner));
-		p->sub->next->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+		ast_channel_softhangup_internal_flag_add(p->sub->next->owner, AST_SOFTHANGUP_DEV);
 		if (p->sub->next->owner) {
 			p->sub->next->alreadygone = 1;
 			mgcp_queue_hangup(p->sub->next);

Modified: trunk/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Thu Mar  1 16:09:18 2012
@@ -5983,8 +5983,8 @@
 	misdn_cfg_get(port, MISDN_CFG_PICKUPGROUP, &pg, sizeof(pg));
 	misdn_cfg_get(port, MISDN_CFG_CALLGROUP, &cg, sizeof(cg));
 	chan_misdn_log(5, port, " --> * CallGrp:%s PickupGrp:%s\n", ast_print_group(buf, sizeof(buf), cg), ast_print_group(buf2, sizeof(buf2), pg));
-	ast->pickupgroup = pg;
-	ast->callgroup = cg;
+	ast_channel_pickupgroup_set(ast, pg);
+	ast_channel_callgroup_set(ast, cg);
 
 	if (ch->originator == ORG_AST) {
 		char callerid[BUFFERSIZE + 1];

Modified: trunk/channels/chan_phone.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_phone.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_phone.c (original)
+++ trunk/channels/chan_phone.c Thu Mar  1 16:09:18 2012
@@ -318,7 +318,7 @@
 		ast_log(LOG_WARNING, "phone_call called on %s, neither down nor reserved\n", ast_channel_name(ast));
 		return -1;
 	}
-	ast_debug(1, "Ringing %s on %s (%d)\n", dest, ast_channel_name(ast), ast->fds[0]);
+	ast_debug(1, "Ringing %s on %s (%d)\n", dest, ast_channel_name(ast), ast_channel_fd(ast, 0));
 
 	start = IXJ_PHONE_RING_START(cid);
 	if (start == -1)
@@ -893,7 +893,7 @@
 		ast_module_ref(ast_module_info->self);
 		if (state != AST_STATE_DOWN) {
 			if (state == AST_STATE_RING) {
-				ioctl(tmp->fds[0], PHONE_RINGBACK);
+				ioctl(ast_channel_fd(tmp, 0), PHONE_RINGBACK);
 				i->cpt = 1;
 			}
 			if (ast_pbx_start(tmp)) {

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Mar  1 16:09:18 2012
@@ -5845,7 +5845,7 @@
 		ast_debug(1, "Detaching from %s\n", ast_channel_name(p->owner));
 		ast_channel_tech_pvt_set(p->owner, NULL);
 		/* Make sure that the channel knows its backend is going away */
-		p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+		ast_channel_softhangup_internal_flag_add(p->owner, AST_SOFTHANGUP_DEV);
 		if (lockowner)
 			ast_channel_unlock(p->owner);
 		/* Give the channel a chance to react before deallocation */
@@ -7240,8 +7240,8 @@
 
 	ast_channel_tech_pvt_set(tmp, dialog_ref(i, "sip_new: set chan->tech_pvt to i"));
 
-	tmp->callgroup = i->callgroup;
-	tmp->pickupgroup = i->pickupgroup;
+	ast_channel_callgroup_set(tmp, i->callgroup);
+	ast_channel_pickupgroup_set(tmp, i->pickupgroup);
 	ast_channel_caller(tmp)->id.name.presentation = i->callingpres;
 	ast_channel_caller(tmp)->id.number.presentation = i->callingpres;
 	if (!ast_strlen_zero(i->parkinglot)) {

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Thu Mar  1 16:09:18 2012
@@ -4915,8 +4915,8 @@
 			ast_channel_amaflags_set(tmp, l->amaflags);
 
 		ast_module_ref(ast_module_info->self);
-		tmp->callgroup = l->callgroup;
-		tmp->pickupgroup = l->pickupgroup;
+		ast_channel_callgroup_set(tmp, l->callgroup);
+		ast_channel_pickupgroup_set(tmp, l->pickupgroup);
 
 		/* XXX Need to figure out how to handle CFwdNoAnswer */
 		if (l->cfwdtype & SKINNY_CFWD_ALL) {

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Thu Mar  1 16:09:18 2012
@@ -1916,13 +1916,13 @@
 	p->subs[a]->rtp = p->subs[b]->rtp;
 	p->subs[b]->rtp = rtp;
 
-	fds = p->subs[a]->owner->fds[0];
-	p->subs[a]->owner->fds[0] = p->subs[b]->owner->fds[0];
-	p->subs[b]->owner->fds[0] = fds;
-
-	fds = p->subs[a]->owner->fds[1];
-	p->subs[a]->owner->fds[1] = p->subs[b]->owner->fds[1];
-	p->subs[b]->owner->fds[1] = fds;
+	fds = ast_channel_fd(p->subs[a]->owner, 0);
+	ast_channel_internal_fd_set(p->subs[a]->owner, 0, ast_channel_fd(p->subs[b]->owner, 0));
+	ast_channel_internal_fd_set(p->subs[b]->owner, 0, fds);
+
+	fds = ast_channel_fd(p->subs[a]->owner, 1);
+	ast_channel_internal_fd_set(p->subs[a]->owner, 1, ast_channel_fd(p->subs[b]->owner, 1));
+	ast_channel_internal_fd_set(p->subs[b]->owner, 1, fds);
 }
 
 static int attempt_transfer(struct unistim_subchannel *p1, struct unistim_subchannel *p2)
@@ -2113,8 +2113,8 @@
 	}
 	ast_rtp_instance_set_prop(sub->rtp, AST_RTP_PROPERTY_RTCP, 1);
 	if (sub->owner) {
-		sub->owner->fds[0] = ast_rtp_instance_fd(sub->rtp, 0);
-		sub->owner->fds[1] = ast_rtp_instance_fd(sub->rtp, 1);
+		ast_channel_internal_fd_set(sub->owner, 0, ast_rtp_instance_fd(sub->rtp, 0));
+		ast_channel_internal_fd_set(sub->owner, 1, ast_rtp_instance_fd(sub->rtp, 1));
 	}
 	ast_rtp_instance_set_qos(sub->rtp, qos.tos_audio, qos.cos_audio, "UNISTIM RTP");
 	ast_rtp_instance_set_prop(sub->rtp, AST_RTP_PROPERTY_NAT, sub->parent->parent->nat);
@@ -4575,8 +4575,8 @@
 	if ((sub->rtp) && (sub->subtype == 0)) {
 		if (unistimdebug)
 			ast_verb(0, "New unistim channel with a previous rtp handle ?\n");
-		tmp->fds[0] = ast_rtp_instance_fd(sub->rtp, 0);
-		tmp->fds[1] = ast_rtp_instance_fd(sub->rtp, 1);
+		ast_channel_internal_fd_set(tmp, 0, ast_rtp_instance_fd(sub->rtp, 0));
+		ast_channel_internal_fd_set(tmp, 1, ast_rtp_instance_fd(sub->rtp, 1));
 	}
 	if (sub->rtp)
 		ast_jb_configure(tmp, &global_jbconf);
@@ -4599,8 +4599,8 @@
 	usecnt++;
 	ast_mutex_unlock(&usecnt_lock);
 	ast_update_use_count();
-	tmp->callgroup = l->callgroup;
-	tmp->pickupgroup = l->pickupgroup;
+	ast_channel_callgroup_set(tmp, l->callgroup);
+	ast_channel_pickupgroup_set(tmp, l->pickupgroup);
 	ast_channel_call_forward_set(tmp, l->parent->call_forward);
 	if (!ast_strlen_zero(l->cid_num)) {
 		char *name, *loc, *instr;

Modified: trunk/channels/chan_vpb.cc
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_vpb.cc?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/chan_vpb.cc (original)
+++ trunk/channels/chan_vpb.cc Thu Mar  1 16:09:18 2012
@@ -2450,8 +2450,8 @@
 			ast_channel_tech_set(tmp, &vpb_tech);
 		}
 
-		tmp->callgroup = me->callgroup;
-		tmp->pickupgroup = me->pickupgroup;
+		ast_channel_callgroup_set(tmp, me->callgroup);
+		ast_channel_pickupgroup_set(tmp, me->pickupgroup);
 	       
 		/* Linear is the preferred format. Although Voicetronix supports other formats
 		 * they are all converted to/from linear in the vpb code. Best for us to use

Modified: trunk/channels/console_video.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/console_video.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/console_video.c (original)
+++ trunk/channels/console_video.c Thu Mar  1 16:09:18 2012
@@ -972,7 +972,6 @@
 			}
 			continue;
 		}
-		fd = chan->alertpipe[1];
 		ast_channel_lock(chan);
 
 		/* AST_LIST_INSERT_TAIL is only good for one frame, cannot use here */
@@ -986,10 +985,9 @@
 		 * more or less same as ast_queue_frame, but extra
 		 * write on the alertpipe to signal frames.
 		 */
-		if (fd > -1) {
-			int blah = 1, l = sizeof(blah);
+		if (ast_channel_alertable(chan)) {
 			for (p = f; p; p = AST_LIST_NEXT(p, frame_list)) {
-				if (write(fd, &blah, l) != l)
+				if (ast_channel_alert(chan)) {
 					ast_log(LOG_WARNING, "Unable to write to alert pipe on %s, frametype/subclass %d/%d: %s!\n",
 						ast_channel_name(chan), f->frametype, f->subclass, strerror(errno));
 			}

Modified: trunk/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_analog.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/sig_analog.c (original)
+++ trunk/channels/sig_analog.c Thu Mar  1 16:09:18 2012
@@ -3603,7 +3603,7 @@
 		f = &p->subs[idx].f;
 		return f;
 	}
-	ast_debug(1, "Exception on %d, channel %d\n", ast->fds[0],p->channel);
+	ast_debug(1, "Exception on %d, channel %d\n", ast_channel_fd(ast, 0), p->channel);
 	/* If it's not us, return NULL immediately */
 	if (ast != p->owner) {
 		ast_log(LOG_WARNING, "We're %s, not %s\n", ast_channel_name(ast), ast_channel_name(p->owner));

Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Thu Mar  1 16:09:18 2012
@@ -5550,7 +5550,7 @@
 				for (x = pri->numchans; x >= 0; x--) {
 					/* find a candidate channel */
 					if (pri->pvts[x] && pri->pvts[x]->owner && pri->pvts[x]->isidlecall) {
-						pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+						ast_channel_softhangup_internal_flag_add(pri->pvts[x]->owner, AST_SOFTHANGUP_DEV);
 						haveidles++;
 						/* Stop if we have enough idle channels or
 						  can't spare any more active idle ones */
@@ -5697,7 +5697,7 @@
 									p->call = NULL;
 								}
 								if (p->owner)
-									p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+									ast_channel_softhangup_internal_flag_add(p->owner, AST_SOFTHANGUP_DEV);
 							}
 							sig_pri_set_alarm(p, 1);
 						}
@@ -5740,7 +5740,7 @@
 						}
 						/* Force soft hangup if appropriate */
 						if (pri->pvts[chanpos]->owner)
-							pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+							ast_channel_softhangup_internal_flag_add(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
 						sig_pri_unlock_private(pri->pvts[chanpos]);
 					}
 				} else {
@@ -5753,7 +5753,7 @@
 								pri->pvts[x]->call = NULL;
 							}
  							if (pri->pvts[x]->owner)
-								pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+								ast_channel_softhangup_internal_flag_add(pri->pvts[x]->owner, AST_SOFTHANGUP_DEV);
 							sig_pri_unlock_private(pri->pvts[x]);
 						}
 				}
@@ -6732,10 +6732,10 @@
 								 * AST_CONTROL_HANGUP frame to guarantee that frame gets read before hangup */
 								pri_queue_control(pri, chanpos, AST_CONTROL_HANGUP);
 							} else {
-								pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+								ast_channel_softhangup_internal_flag_add(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
 							}
 #else
-							pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+							ast_channel_softhangup_internal_flag_add(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
 #endif	/* defined(HAVE_PRI_AOC_EVENTS) */
 						}
 					} else {
@@ -6885,10 +6885,10 @@
 							 * to guarantee that frame gets read before hangup */
 							pri_queue_control(pri, chanpos, AST_CONTROL_HANGUP);
 						} else {
-							pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+							ast_channel_softhangup_internal_flag_add(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
 						}
 #else
-						pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+						ast_channel_softhangup_internal_flag_add(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
 #endif	/* defined(HAVE_PRI_AOC_EVENTS) */
 					}
 					ast_verb(3, "Span %d: Channel %d/%d got hangup request, cause %d\n",
@@ -6986,7 +6986,7 @@
 									"Span %d: Got restart ack on channel %d/%d with owner\n",
 									pri->span, pri->pvts[chanpos]->logicalspan,
 									pri->pvts[chanpos]->prioffset);
-								pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+								ast_channel_softhangup_internal_flag_add(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
 							}
 							pri->pvts[chanpos]->resetting = 0;
 							ast_verb(3,
@@ -7012,7 +7012,7 @@
 							"Span %d: Got restart ack on channel %d/%d with owner\n",
 							pri->span, pri->pvts[chanpos]->logicalspan,
 							pri->pvts[chanpos]->prioffset);
-						pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+						ast_channel_softhangup_internal_flag_add(pri->pvts[chanpos]->owner, AST_SOFTHANGUP_DEV);
 					}
 					pri->pvts[chanpos]->resetting = 0;
 					ast_verb(3,
@@ -7863,7 +7863,7 @@
 	case AST_CONTROL_BUSY:
 		if (p->priindication_oob || p->no_b_channel) {
 			ast_channel_hangupcause_set(chan, AST_CAUSE_USER_BUSY);
-			chan->_softhangup |= AST_SOFTHANGUP_DEV;
+			ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
 			res = 0;
 			break;
 		}
@@ -7956,7 +7956,7 @@
 			default:
 				break;
 			}
-			chan->_softhangup |= AST_SOFTHANGUP_DEV;
+			ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
 			res = 0;
 			break;
 		}
@@ -8788,7 +8788,7 @@
 				p->call = NULL;
 			}
 			if (p->owner)
-				p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+				ast_channel_softhangup_internal_flag_add(p->owner, AST_SOFTHANGUP_DEV);
 		}
 	}
 	sig_pri_span_devstate_changed(p->pri);

Modified: trunk/channels/sig_ss7.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_ss7.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/channels/sig_ss7.c (original)
+++ trunk/channels/sig_ss7.c Thu Mar  1 16:09:18 2012
@@ -444,7 +444,7 @@
 		if (linkset->pvts[i] && (linkset->pvts[i]->dpc == dpc && ((linkset->pvts[i]->cic >= startcic) && (linkset->pvts[i]->cic <= endcic)))) {
 			sig_ss7_lock_private(linkset->pvts[i]);
 			if (linkset->pvts[i]->owner)
-				linkset->pvts[i]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+				ast_channel_softhangup_internal_flag_add(linkset->pvts[i]->owner, AST_SOFTHANGUP_DEV);
 			sig_ss7_unlock_private(linkset->pvts[i]);
 		}
 	}

Modified: trunk/funcs/func_channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_channel.c?view=diff&rev=357721&r1=357720&r2=357721
==============================================================================
--- trunk/funcs/func_channel.c (original)
+++ trunk/funcs/func_channel.c Thu Mar  1 16:09:18 2012
@@ -394,10 +394,10 @@
 		locked_copy_string(chan, buf, transfercapability_table[ast_channel_transfercapability(chan) & 0x1f], len);
 	} else if (!strcasecmp(data, "callgroup")) {
 		char groupbuf[256];
-		locked_copy_string(chan, buf,  ast_print_group(groupbuf, sizeof(groupbuf), chan->callgroup), len);
+		locked_copy_string(chan, buf,  ast_print_group(groupbuf, sizeof(groupbuf), ast_channel_callgroup(chan)), len);
 	} else if (!strcasecmp(data, "pickupgroup")) {
 		char groupbuf[256];
-		locked_copy_string(chan, buf,  ast_print_group(groupbuf, sizeof(groupbuf), chan->pickupgroup), len);
+		locked_copy_string(chan, buf,  ast_print_group(groupbuf, sizeof(groupbuf), ast_channel_pickupgroup(chan)), len);
 	} else if (!strcasecmp(data, "amaflags")) {
 		char amabuf[256];
 		snprintf(amabuf,sizeof(amabuf), "%d", ast_channel_amaflags(chan));
@@ -486,9 +486,9 @@
 			new_zone = ast_tone_zone_unref(new_zone);
 		}
 	} else if (!strcasecmp(data, "callgroup")) {
-		chan->callgroup = ast_get_group(value);
+		ast_channel_callgroup_set(chan, ast_get_group(value));
 	} else if (!strcasecmp(data, "pickupgroup")) {
-		chan->pickupgroup = ast_get_group(value);
+		ast_channel_pickupgroup_set(chan, ast_get_group(value));
 	} else if (!strcasecmp(data, "txgain")) {
 		sscanf(value, "%4hhd", &gainset);
 		ast_channel_setoption(chan, AST_OPTION_TXGAIN, &gainset, sizeof(gainset), 0);

Modified: trunk/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=357721&r1=357720&r2=357721

[... 1068 lines stripped ...]



More information about the asterisk-commits mailing list