aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-19 16:58:19 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-19 16:58:19 +0000
commitfe3f0ba26549818f3da51da7123e5ea5cf3302cd (patch)
tree39caf2b2f00517992c949879ebedee76378dfec1 /main/channel.c
parent809d4e743df6110a5c2e2e9cdeff2b7954e27c8f (diff)
Change informative messages to use the _multiple variant when multiple formats
are possible. (Closes issue #12848) Reported by klaus3000 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@123930 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/channel.c b/main/channel.c
index 49b097f35..05f05d2f8 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2297,10 +2297,10 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
f = &ast_null_frame;
}
} else if ((f->frametype == AST_FRAME_VOICE) && !(f->subclass & chan->nativeformats)) {
- /* This frame can't be from the current native formats -- drop it on the
- floor */
+ /* This frame is not one of the current native formats -- drop it on the floor */
+ char to[200];
ast_log(LOG_NOTICE, "Dropping incompatible voice frame on %s of format %s since our native format has changed to %s\n",
- chan->name, ast_getformatname(f->subclass), ast_getformatname(chan->nativeformats));
+ chan->name, ast_getformatname(f->subclass), ast_getformatname_multiple(to, sizeof(to), chan->nativeformats));
ast_frfree(f);
f = &ast_null_frame;
} else if ((f->frametype == AST_FRAME_VOICE)) {
@@ -2794,6 +2794,7 @@ static int set_format(struct ast_channel *chan, int fmt, int *rawformat, int *fo
{
int native;
int res;
+ char from[200], to[200];
/* Make sure we only consider audio */
fmt &= AST_FORMAT_AUDIO_MASK;
@@ -2809,7 +2810,8 @@ static int set_format(struct ast_channel *chan, int fmt, int *rawformat, int *fo
if (res < 0) {
ast_log(LOG_WARNING, "Unable to find a codec translation path from %s to %s\n",
- ast_getformatname(native), ast_getformatname(fmt));
+ ast_getformatname_multiple(from, sizeof(from), native),
+ ast_getformatname_multiple(to, sizeof(to), fmt));
return -1;
}