summaryrefslogtreecommitdiff
path: root/channels/chan_gtalk.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-01-24 20:12:09 +0000
committerTerry Wilson <twilson@digium.com>2012-01-24 20:12:09 +0000
commit99cae5b7508f30a308afbbacf92ad306a30f68df (patch)
treebdca00ce837e60a5f9a16fed06d02f6e77235035 /channels/chan_gtalk.c
parent2144ba5df2813609024964c4c2d9060b30d5cd43 (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 'channels/chan_gtalk.c')
-rw-r--r--channels/chan_gtalk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c
index 21b80e254..d9464d1a6 100644
--- a/channels/chan_gtalk.c
+++ b/channels/chan_gtalk.c
@@ -1181,15 +1181,15 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i,
tmp->caller.id.name.presentation = client->callingpres;
tmp->caller.id.number.presentation = client->callingpres;
if (!ast_strlen_zero(client->accountcode))
- ast_string_field_set(tmp, accountcode, client->accountcode);
+ ast_channel_accountcode_set(tmp, client->accountcode);
if (client->amaflags)
tmp->amaflags = client->amaflags;
if (!ast_strlen_zero(client->language))
- ast_string_field_set(tmp, language, client->language);
+ ast_channel_language_set(tmp, client->language);
if (!ast_strlen_zero(client->musicclass))
- ast_string_field_set(tmp, musicclass, client->musicclass);
+ ast_channel_musicclass_set(tmp, client->musicclass);
if (!ast_strlen_zero(client->parkinglot))
- ast_string_field_set(tmp, parkinglot, client->parkinglot);
+ ast_channel_parkinglot_set(tmp, client->parkinglot);
i->owner = tmp;
ast_module_ref(ast_module_info->self);
ast_copy_string(tmp->context, client->context, sizeof(tmp->context));
@@ -1940,7 +1940,7 @@ static struct ast_channel *gtalk_request(const char *type, struct ast_format_cap
ASTOBJ_WRLOCK(client);
p = gtalk_alloc(client, strchr(sender, '@') ? sender : client->connection->jid->full, strchr(to, '@') ? to : client->user, NULL);
if (p) {
- chan = gtalk_new(client, p, AST_STATE_DOWN, to, requestor ? requestor->linkedid : NULL);
+ chan = gtalk_new(client, p, AST_STATE_DOWN, to, requestor ? ast_channel_linkedid(requestor) : NULL);
}
ASTOBJ_UNLOCK(client);
return chan;