]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 76653 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Mon, 23 Jul 2007 18:29:48 +0000 (18:29 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 23 Jul 2007 18:29:48 +0000 (18:29 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76653 | file | 2007-07-23 15:28:13 -0300 (Mon, 23 Jul 2007) | 4 lines

(closes issue #5866)
Reported by: tyler
Do not force channel format changes when a generator is present. The generator may have changed the formats itself and changing them back would cause issues.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76654 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 4ebf9e1202640bb6c64cd8237a6b3d5d020b78bb..04314a514a7192750fe2e553d0c2d9f521992df4 100644 (file)
@@ -212,9 +212,9 @@ static AST_LIST_HEAD_STATIC(agents, agent_pvt);     /*!< Holds the list of agents (l
                        ast_set_read_format(ast, ast->readformat); \
                        ast_set_write_format(ast, ast->writeformat); \
                } \
-               if (p->chan->readformat != ast->rawreadformat)  \
+               if (p->chan->readformat != ast->rawreadformat && !p->chan->generator)  \
                        ast_set_read_format(p->chan, ast->rawreadformat); \
-               if (p->chan->writeformat != ast->rawwriteformat) \
+               if (p->chan->writeformat != ast->rawwriteformat && !p->chan->generator) \
                        ast_set_write_format(p->chan, ast->rawwriteformat); \
        } \
 } while(0)