From 9284ed1df122199739e549cb2a038ff56cb8f93e Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Mon, 6 Nov 2017 16:38:05 -0500 Subject: 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 --- main/stream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'main/stream.c') 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); -- cgit v1.2.3