aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_agent.c
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-16 05:10:35 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-16 05:10:35 +0000
commitc3ef7b672f25621ba670ba22955a3dfc0953c739 (patch)
tree25d33da4ebede3baf10bbd03a14ef1333cc1ad4a /channels/chan_agent.c
parent5dd6c3c66f480f29669530224f0f26eb3005ca73 (diff)
Show the names of the codecs instead of the numbers (bug #92)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1348 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_agent.c')
-rwxr-xr-xchannels/chan_agent.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index ccc5e56e0..aeb867784 100755
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -398,7 +398,7 @@ static int agent_call(struct ast_channel *ast, char *dest, int timeout)
res = ast_set_read_format(p->chan, ast_best_codec(p->chan->nativeformats));
ast_log( LOG_DEBUG, "Set read format, result '%d'\n", res);
if (res)
- ast_log(LOG_WARNING, "Unable to set read format to %d\n", ast_best_codec(p->chan->nativeformats));
+ ast_log(LOG_WARNING, "Unable to set read format to %s\n", ast_getformatname(ast_best_codec(p->chan->nativeformats)));
} else {
// Agent hung-up
p->chan = NULL;
@@ -408,7 +408,7 @@ static int agent_call(struct ast_channel *ast, char *dest, int timeout)
ast_set_write_format(p->chan, ast_best_codec(p->chan->nativeformats));
ast_log( LOG_DEBUG, "Set write format, result '%d'\n", res);
if (res)
- ast_log(LOG_WARNING, "Unable to set write format to %d\n", ast_best_codec(p->chan->nativeformats));
+ ast_log(LOG_WARNING, "Unable to set write format to %s\n", ast_getformatname(ast_best_codec(p->chan->nativeformats)));
}
if( !res )
{
@@ -1046,8 +1046,8 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
"Channel: %s\r\n",
p->agent, chan->name);
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Agent '%s' logged in (format %d/%d)\n", p->agent,
- chan->readformat, chan->writeformat);
+ ast_verbose(VERBOSE_PREFIX_3 "Agent '%s' logged in (format %s/%s)\n", p->agent,
+ ast_getformatname(chan->readformat), ast_getformatname(chan->writeformat));
/* Login this channel and wait for it to
go away */
p->chan = chan;