]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
(closes issue #5866)
authorJoshua Colp <jcolp@digium.com>
Mon, 23 Jul 2007 18:28:13 +0000 (18:28 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 23 Jul 2007 18:28:13 +0000 (18:28 +0000)
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.2@76653 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index c106162e4c708692411987a272819bdc35aa316d..53d7d10676eb7e17e06df064b5176f1958e69989 100644 (file)
@@ -217,9 +217,9 @@ static struct agent_pvt *agents = NULL;  /**< Holds the list of agents (loaded f
                        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)