[Asterisk-code-review] Channel alert pipe: improve diagnostic error return (asterisk[master])

Scott Griepentrog asteriskteam at digium.com
Wed Jul 1 16:12:24 CDT 2015


Scott Griepentrog has posted comments on this change.

Change subject: Channel alert pipe: improve diagnostic error return
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/752/1/main/channel_internal_api.c
File main/channel_internal_api.c:

Line 1206: 	/* preset errno in case returned size does not match */
         : 	errno = EPIPE;
> Should move this assignment to after the if statement to better associate w
I'm setting it on purpose before the statement, so that if a failure that sets errno precipitates a non-valid return size, then we see that error, otherwise the EPIPE falls through.  I guess it wouldn't matter if errno=EPIPE was put just before the return write... if that is what you meant?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1bf7b3337ad392789a9f02c650589cd065d20b5b
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Scott Griepentrog <sgriepentrog at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Scott Griepentrog <sgriepentrog at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list