]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_stream_echo: Fix state of added streams.
authorJoshua C. Colp <jcolp@sangoma.com>
Thu, 18 Jun 2020 08:49:37 +0000 (05:49 -0300)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Fri, 19 Jun 2020 14:15:44 +0000 (09:15 -0500)
When stream support was added to Asterisk the stream state
was used inconsistently, resulting in odd behavior. This
was then standardized to be the state of a stream from the
perspective of Asterisk.

This change updates the StreamEcho dialplan application
to use the correct state, send only, since we are only
sending to the endpoint and not expecting them to send us
multiple video streams.

ASTERISK-28954

Change-Id: I35bfd533ef1184ffe62586b22bbd253c82872a56

apps/app_stream_echo.c

index 717ed1c8860ea7edffc64846b6efe7ee3fb7fdd3..669f92e72cf01008774fb7b627596f514c0b6a94 100644 (file)
@@ -274,7 +274,7 @@ static struct ast_stream_topology *stream_echo_topology_alloc(
                         * cloning the same stream.
                         */
                        ast_stream_set_state(stream, n == num ?
-                            AST_STREAM_STATE_SENDRECV : AST_STREAM_STATE_RECVONLY);
+                            AST_STREAM_STATE_SENDRECV : AST_STREAM_STATE_SENDONLY);
                } while (--n);
        }