[Asterisk-code-review] chan_dahdi: Add POLARITY function. (asterisk[master])
N A
asteriskteam at digium.com
Fri May 13 13:43:00 CDT 2022
Attention is currently required from: Kevin Harwell.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18362 )
Change subject: chan_dahdi: Add POLARITY function.
......................................................................
Patch Set 4:
(2 comments)
File channels/chan_dahdi.c:
https://gerrit.asterisk.org/c/asterisk/+/18362/comment/ceb83f6c_fd53fa99
PS1, Line 195: <para>However, when read, the function will always return 0 or 1.</para>
> It seems "idle" and "reverse" are just synonyms for "0" and "1", correct?
Yup!
https://gerrit.asterisk.org/c/asterisk/+/18362/comment/30b75b0b_ff2e92c1
PS1, Line 2675: int res;
: struct dahdi_params dahdip;
: struct dahdi_pvt *pvt;
:
: if (strcasecmp(ast_channel_tech(chan)->type, "DAHDI")) {
: ast_log(LOG_WARNING, "%s is not a DAHDI channel\n", ast_channel_name(chan));
: return -1;
: }
:
: memset(&dahdip, 0, sizeof(dahdip));
: res = ioctl(ast_channel_fd(chan, 0), DAHDI_GET_PARAMS, &dahdip);
:
: if (res) {
: ast_log(LOG_WARNING, "Unable to get parameters of %s: %s\n", ast_channel_name(chan), strerror(errno));
: return -1;
: }
: if (!(dahdip.sigtype & __DAHDI_SIG_FXO)) {
: ast_log(LOG_WARNING, "%s is not an FXS Channel\n", ast_channel_name(chan));
: return -1;
: }
:
: pvt = ast_channel_tech_pvt(chan);
: if (!dahdi_analog_lib_handles(pvt->sig, 0, 0)) {
: ast_log(LOG_WARNING, "Channel signalling is not analog");
: return -1;
: }
> This code looks duped below. […]
Done
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18362
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: If6f50998f723e4484bf68e2473f5cedfeaf9b8f1
Gerrit-Change-Number: 18362
Gerrit-PatchSet: 4
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Kevin Harwell <kharwell at digium.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Fri, 13 May 2022 18:43:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220513/6aa0fea1/attachment.html>
More information about the asterisk-code-review
mailing list