<p>Patch set 21:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11579">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11579/21/apps/app_audiosocket.c">File apps/app_audiosocket.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11579/21/apps/app_audiosocket.c@114">Patch Set #21, Line 114:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">     ao2_bump(writeFormat = ast_channel_writeformat(chan));<br>        ao2_bump(readFormat = ast_channel_readformat(chan));<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">You're silly.</p><p style="white-space: pre-wrap; word-wrap: break-word;">writeFormat = ao2_bump(ast_channel_writeformat(chan));<br>readFormat = ao2_bump(ast_channel_readformat(chan));</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11579/21/apps/app_audiosocket.c@197">Patch Set #21, Line 197:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">    targetChan = ast_waitfor_nandfds(&chan, 1, &svc, 1, NULL, &outfd, &ms);<br>               if (targetChan) {<br>                     f = ast_read(targetChan);<br>                     if (!f) {<br>                             ast_log(LOG_ERROR, "Failed to receive frame from channel %s on AudioSocket\n",<br>                                      chanName);<br>                            return -1;<br>                    }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This isn't right. It can be used on line 173 instead of ast_waitfor. When it returns you can then do the ast_read, frametype check, send frame if it got a channel. If it got a file descriptor instead then you do the audiosocket_receive_frame and write to channel.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11579/21/channels/chan_audiosocket.c">File channels/chan_audiosocket.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11579/21/channels/chan_audiosocket.c@211">Patch Set #21, Line 211:</a> <code style="font-family:monospace,monospace">            if (fd) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This should be >= 0, or else you may close a negative file descriptor on an error case.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11579">change 11579</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11579"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie866e6c4fa13178ec76f2a6971ad3590a3a588b5 </div>
<div style="display:none"> Gerrit-Change-Number: 11579 </div>
<div style="display:none"> Gerrit-PatchSet: 21 </div>
<div style="display:none"> Gerrit-Owner: Seán C. McCord <ulexus@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Seán C. McCord <ulexus@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 16 Oct 2019 15:11:20 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>