[asterisk-commits] branch kpfleming/chanfunc r9477 - /team/kpfleming/chanfunc/funcs/func_channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 10 20:51:01 MST 2006


Author: kpfleming
Date: Fri Feb 10 21:51:00 2006
New Revision: 9477

URL: http://svn.digium.com/view/asterisk?rev=9477&view=rev
Log:
use single format output for nativeformats (for now)

Modified:
    team/kpfleming/chanfunc/funcs/func_channel.c

Modified: team/kpfleming/chanfunc/funcs/func_channel.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/chanfunc/funcs/func_channel.c?rev=9477&r1=9476&r2=9477&view=diff
==============================================================================
--- team/kpfleming/chanfunc/funcs/func_channel.c (original)
+++ team/kpfleming/chanfunc/funcs/func_channel.c Fri Feb 10 21:51:00 2006
@@ -41,9 +41,13 @@
 static char *func_channel(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) 
 {
         if (!strcasecmp(data, "audionativeformat"))
-                ast_getformatname_multiple(buf, len, chan->nativeformats & AST_FORMAT_AUDIO_MASK);
+                /* use the _multiple version when chan->nativeformats holds multiple formats */
+/*                ast_getformatname_multiple(buf, len, chan->nativeformats & AST_FORMAT_AUDIO_MASK); */
+                ast_copy_string(buf, ast_getformatname(chan->nativeformats & AST_FORMAT_AUDIO_MASK), len);
         else if (!strcasecmp(data, "videonativeformat"))
-                ast_getformatname_multiple(buf, len, chan->nativeformats & AST_FORMAT_VIDEO_MASK);
+                /* use the _multiple version when chan->nativeformats holds multiple formats */
+/*                ast_getformatname_multiple(buf, len, chan->nativeformats & AST_FORMAT_VIDEO_MASK); */
+                ast_copy_string(buf, ast_getformatname(chan->nativeformats & AST_FORMAT_VIDEO_MASK), len);
         else if (!strcasecmp(data, "audioreadformat"))
                 ast_copy_string(buf, ast_getformatname(chan->readformat), len);
         else if (!strcasecmp(data, "audiowriteformat"))



More information about the asterisk-commits mailing list