summaryrefslogtreecommitdiff
path: root/main/stream.c
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-11-06 16:38:05 -0500
committerCorey Farrell <git@cfware.com>2017-11-07 11:28:58 -0500
commit9284ed1df122199739e549cb2a038ff56cb8f93e (patch)
tree01ded0872e0ef20a6762b385d690d1e428c2b7b3 /main/stream.c
parent7fc3399d6d8a18da4522331fd7650228a2fe7a3f (diff)
stream: Return error from ast_stream_topology_set_stream.
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
Diffstat (limited to 'main/stream.c')
-rw-r--r--main/stream.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/stream.c b/main/stream.c
index 72d859954..8597485f7 100644
--- a/main/stream.c
+++ b/main/stream.c
@@ -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);