From 99cae5b7508f30a308afbbacf92ad306a30f68df Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Tue, 24 Jan 2012 20:12:09 +0000 Subject: Opaquify channel stringfields Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- addons/app_saycountpl.c | 6 +++--- addons/chan_mobile.c | 4 ++-- addons/chan_ooh323.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'addons') diff --git a/addons/app_saycountpl.c b/addons/app_saycountpl.c index b4441f24f..dce519d94 100644 --- a/addons/app_saycountpl.c +++ b/addons/app_saycountpl.c @@ -67,13 +67,13 @@ static int saywords(struct ast_channel *chan, char *word1, char *word2, char *wo if (num > 0) { if (num % 1000 == 1) { - ast_streamfile(chan, word1, chan->language); + ast_streamfile(chan, word1, ast_channel_language(chan)); d = ast_waitstream(chan,""); } else if (((num % 10) >= 2) && ((num % 10) <= 4 ) && ((num % 100) < 10 || (num % 100) > 20)) { - ast_streamfile(chan, word2, chan->language); + ast_streamfile(chan, word2, ast_channel_language(chan)); d = ast_waitstream(chan, ""); } else { - ast_streamfile(chan, word5, chan->language); + ast_streamfile(chan, word5, ast_channel_language(chan)); d = ast_waitstream(chan, ""); } } diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c index b99b2d7f7..0588ef81b 100644 --- a/addons/chan_mobile.c +++ b/addons/chan_mobile.c @@ -837,7 +837,7 @@ static struct ast_channel *mbl_new(int state, struct mbl_pvt *pvt, char *cid_num ast_dsp_digitreset(pvt->dsp); chn = ast_channel_alloc(1, state, cid_num, pvt->id, 0, 0, pvt->context, - requestor ? requestor->linkedid : "", 0, + requestor ? ast_channel_linkedid(requestor) : "", 0, "Mobile/%s-%04lx", pvt->id, ast_random() & 0xffff); if (!chn) { goto e_return; @@ -854,7 +854,7 @@ static struct ast_channel *mbl_new(int state, struct mbl_pvt *pvt, char *cid_num if (state == AST_STATE_RING) chn->rings = 1; - ast_string_field_set(chn, language, "en"); + ast_channel_language_set(chn, "en"); pvt->owner = chn; if (pvt->sco_socket != -1) { diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index c1a69bcf6..1ed389a05 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -461,7 +461,7 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state, } if (!ast_strlen_zero(i->accountcode)) - ast_string_field_set(ch, accountcode, i->accountcode); + ast_channel_accountcode_set(ch, i->accountcode); if (i->amaflags) ch->amaflags = i->amaflags; @@ -701,7 +701,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca chan = ooh323_new(p, AST_STATE_DOWN, p->username, cap, - requestor ? requestor->linkedid : NULL); + requestor ? ast_channel_linkedid(requestor) : NULL); ast_mutex_unlock(&p->lock); -- cgit v1.2.3