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:53 -0500
commitfb188951084d84da7997df3678c42b9ed3ddcb33 (patch)
tree943bd4513390e0bd35e45b89832ef55176bc5465 /main/stream.c
parent3c897daabf26625933dbc498d99de24700a115d5 (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 c233b2f34..61eef2504 100644
--- a/main/stream.c
+++ b/main/stream.c
@@ -415,8 +415,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);