mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 17:27:02 +00:00
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
This commit is contained in:
@@ -415,8 +415,7 @@ int ast_stream_topology_set_stream(struct ast_stream_topology *topology,
|
|||||||
stream->position = position;
|
stream->position = position;
|
||||||
|
|
||||||
if (position == AST_VECTOR_SIZE(&topology->streams)) {
|
if (position == AST_VECTOR_SIZE(&topology->streams)) {
|
||||||
AST_VECTOR_APPEND(&topology->streams, stream);
|
return AST_VECTOR_APPEND(&topology->streams, stream);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return AST_VECTOR_REPLACE(&topology->streams, position, stream);
|
return AST_VECTOR_REPLACE(&topology->streams, position, stream);
|
||||||
|
Reference in New Issue
Block a user