[Asterisk-code-review] stream: Return error from ast stream topology set stream. (asterisk[master])

Jenkins2 asteriskteam at digium.com
Wed Nov 8 06:06:52 CST 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7045 )

Change subject: stream: Return error from ast_stream_topology_set_stream.
......................................................................

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
---
M main/stream.c
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/stream.c b/main/stream.c
index c233b2f..61eef25 100644
--- a/main/stream.c
+++ b/main/stream.c
@@ -415,8 +415,7 @@
 	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);

-- 
To view, visit https://gerrit.asterisk.org/7045
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6c0d12755743eadba1357f6153526cc055592856
Gerrit-Change-Number: 7045
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171108/20884a24/attachment-0001.html>


More information about the asterisk-code-review mailing list