diff options
author | Terry Wilson <twilson@digium.com> | 2012-01-24 20:12:09 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2012-01-24 20:12:09 +0000 |
commit | 99cae5b7508f30a308afbbacf92ad306a30f68df (patch) | |
tree | bdca00ce837e60a5f9a16fed06d02f6e77235035 /main/dial.c | |
parent | 2144ba5df2813609024964c4c2d9060b30d5cd43 (diff) |
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
Diffstat (limited to 'main/dial.c')
-rw-r--r-- | main/dial.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/main/dial.c b/main/dial.c index 7fe49be33..a18e06505 100644 --- a/main/dial.c +++ b/main/dial.c @@ -286,10 +286,10 @@ static int begin_dial_channel(struct ast_dial_channel *channel, struct ast_chann ast_connected_line_copy_from_caller(&channel->owner->connected, &chan->caller); - ast_string_field_set(channel->owner, language, chan->language); - ast_string_field_set(channel->owner, accountcode, chan->accountcode); - if (ast_strlen_zero(channel->owner->musicclass)) - ast_string_field_set(channel->owner, musicclass, chan->musicclass); + ast_channel_language_set(channel->owner, ast_channel_language(chan)); + ast_channel_accountcode_set(channel->owner, ast_channel_accountcode(chan)); + if (ast_strlen_zero(ast_channel_musicclass(channel->owner))) + ast_channel_musicclass_set(channel->owner, ast_channel_musicclass(chan)); channel->owner->adsicpe = chan->adsicpe; channel->owner->transfercapability = chan->transfercapability; @@ -331,7 +331,7 @@ static int begin_dial(struct ast_dial *dial, struct ast_channel *chan) static int handle_call_forward(struct ast_dial *dial, struct ast_dial_channel *channel, struct ast_channel *chan) { struct ast_channel *original = channel->owner; - char *tmp = ast_strdupa(channel->owner->call_forward); + char *tmp = ast_strdupa(ast_channel_call_forward(channel->owner)); char *tech = "Local", *device = tmp, *stuff; /* If call forwarding is disabled just drop the original channel and don't attempt to dial the new one */ @@ -567,11 +567,11 @@ static enum ast_dial_result monitor_dial(struct ast_dial *dial, struct ast_chann ast_indicate(chan, AST_CONTROL_RINGING); } else if (chan && dial->options[AST_DIAL_OPTION_MUSIC] && !ast_strlen_zero(dial->options[AST_DIAL_OPTION_MUSIC])) { - char *original_moh = ast_strdupa(chan->musicclass); + char *original_moh = ast_strdupa(ast_channel_musicclass(chan)); ast_indicate(chan, -1); - ast_string_field_set(chan, musicclass, dial->options[AST_DIAL_OPTION_MUSIC]); + ast_channel_musicclass_set(chan, dial->options[AST_DIAL_OPTION_MUSIC]); ast_moh_start(chan, dial->options[AST_DIAL_OPTION_MUSIC], NULL); - ast_string_field_set(chan, musicclass, original_moh); + ast_channel_musicclass_set(chan, original_moh); } /* Record start time for timeout purposes */ @@ -628,7 +628,7 @@ static enum ast_dial_result monitor_dial(struct ast_dial *dial, struct ast_chann channel = find_relative_dial_channel(dial, who); /* See if this channel has been forwarded elsewhere */ - if (!ast_strlen_zero(who->call_forward)) { + if (!ast_strlen_zero(ast_channel_call_forward(who))) { handle_call_forward(dial, channel, chan); continue; } |