[Asterisk-code-review] Channel alert pipe: improve diagnostic error return (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Wed Jul 1 16:31:23 CDT 2015
Richard Mudgett 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;
> I'm setting it on purpose before the statement, so that if a failure that s
That's exactly what I meant. The comment applies to write() and not the if test. Moving also avoids a redundant write to errno.
if (!alert_writeable) {
errno = EBADF;
return 0;
}
errno = EPIPE;
return write();
--
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