]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
stream: Return error from ast_stream_topology_set_stream.
authorCorey Farrell <git@cfware.com>
Mon, 6 Nov 2017 21:38:05 +0000 (16:38 -0500)
committerCorey Farrell <git@cfware.com>
Tue, 7 Nov 2017 16:28:58 +0000 (11:28 -0500)
ast_stream_topology_set_stream had suppressed error codes from
AST_VECTOR_APPEND.  The result of AST_VECTOR_APPEND needs to be returned
to the caller so they can take appropriate action on the stream.

Change-Id: I6c0d12755743eadba1357f6153526cc055592856

main/stream.c

index 72d859954d215c6ef65e52a06d2261ded979dce9..8597485f7ccd5e8095f1037a3d25ec0f5d245299 100644 (file)
@@ -398,8 +398,7 @@ int ast_stream_topology_set_stream(struct ast_stream_topology *topology,
        stream->position = position;
 
        if (position == AST_VECTOR_SIZE(&topology->streams)) {
-               AST_VECTOR_APPEND(&topology->streams, stream);
-               return 0;
+               return AST_VECTOR_APPEND(&topology->streams, stream);
        }
 
        return AST_VECTOR_REPLACE(&topology->streams, position, stream);