summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r--channels/chan_mgcp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index b73ccd24c..96c22d155 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -1212,8 +1212,8 @@ static struct ast_frame *mgcp_rtp_read(struct mgcp_subchannel *sub)
if (!ast_format_cap_iscompatible(ast_channel_nativeformats(sub->owner), &f->subclass.format)) {
ast_debug(1, "Oooh, format changed to %s\n", ast_getformatname(&f->subclass.format));
ast_format_cap_set(ast_channel_nativeformats(sub->owner), &f->subclass.format);
- ast_set_read_format(sub->owner, &sub->owner->readformat);
- ast_set_write_format(sub->owner, &sub->owner->writeformat);
+ ast_set_read_format(sub->owner, ast_channel_readformat(sub->owner));
+ ast_set_write_format(sub->owner, ast_channel_writeformat(sub->owner));
}
/* Courtesy fearnor aka alex@pilosoft.com */
if ((sub->parent->dtmfmode & MGCP_DTMF_INBAND) && (sub->parent->dsp)) {
@@ -1256,8 +1256,8 @@ static int mgcp_write(struct ast_channel *ast, struct ast_frame *frame)
ast_log(LOG_WARNING, "Asked to transmit frame type %s, while native formats is %s (read/write = %s/%s)\n",
ast_getformatname(&frame->subclass.format),
ast_getformatname_multiple(buf, sizeof(buf), ast_channel_nativeformats(ast)),
- ast_getformatname(&ast->readformat),
- ast_getformatname(&ast->writeformat));
+ ast_getformatname(ast_channel_readformat(ast)),
+ ast_getformatname(ast_channel_writeformat(ast)));
/* return -1; */
}
}
@@ -1518,10 +1518,10 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state, cons
ast_channel_rings_set(tmp, 1);
ast_best_codec(ast_channel_nativeformats(tmp), &tmpfmt);
- ast_format_copy(&tmp->writeformat, &tmpfmt);
- ast_format_copy(&tmp->rawwriteformat, &tmpfmt);
- ast_format_copy(&tmp->readformat, &tmpfmt);
- ast_format_copy(&tmp->rawreadformat, &tmpfmt);
+ ast_format_copy(ast_channel_writeformat(tmp), &tmpfmt);
+ ast_format_copy(ast_channel_rawwriteformat(tmp), &tmpfmt);
+ ast_format_copy(ast_channel_readformat(tmp), &tmpfmt);
+ ast_format_copy(ast_channel_rawreadformat(tmp), &tmpfmt);
ast_channel_tech_pvt_set(tmp, sub);
if (!ast_strlen_zero(i->language))
ast_channel_language_set(tmp, i->language);