<p> Attention is currently required from: N A. </p>
<p>Patch set 2:<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/+/16071">View Change</a></p><p>8 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File funcs/func_framedrop.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/asterisk/+/16071/comment/a0f52e35_aaa8ab7f">Patch Set #2, Line 1:</a> <code style="font-family:monospace,monospace">/*</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The source file name should probably be func_frame_drop.c to make it consistent with func_frame_trace.c</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/e2d8fa69_146b8d64">Patch Set #2, Line 42:</a> <code style="font-family:monospace,monospace">Intercepts specified frames on a channel instead of passing them on.</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">"Drops specific frame types in the <literal>TX</literal> or <literal>RX</literal> direction on a channel.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/222f77cd_e7decd4c">Patch Set #2, Line 45:</a> <code style="font-family:monospace,monospace">ilter list type</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">How about "direction"?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/71443768_9c589763">Patch Set #2, Line 46:</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;">A filter can be applied to the trace to limit what frames are suppressed. This<br>                               filter can be a <literal>TX</literal> or <literal>RX</literal> list of frame types<br>                            and control frame types.<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">How about... "List of frame types to be dropped for the specified direction.  Direction can be <literal>TX</literal> or <literal>RX</literal>."</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/d893b3f0_f7c47b5a">Patch Set #2, Line 124:</a> <code style="font-family:monospace,monospace">static struct {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The lists are a little fragile since someone could add a new frametype and forget to update these lists but I know that's how func_frame_trace does it.   Maybe at some later time you could create a generic name mapping function for everyone to use. :)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/94f8e533_eb3b8ce7">Patch Set #2, Line 195:</a> <code style="font-family:monospace,monospace">int list_type; /* 0 = TX, 1 = RX */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Can you make this an enum?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/565c2bdc_a775d6e4">Patch Set #2, Line 278:</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;">  for (i = 0; i < ARRAY_LEN(frametype2str); i++) {<br>           if (strcasestr(value, frametype2str[i].str)) {<br>                        framedata->values[i] = 1;<br>          }<br>     }<br><br>   for (i = 0; i < ARRAY_LEN(controlframetype2str); i++) {<br>            if (strcasestr(value, controlframetype2str[i].str)) {<br>                 framedata->controlvalues[i] = 1;<br>           }<br>     }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I think these are going to be an issue because if a user specified "TEXT_DATA", both "TEXT" and "TEXT_DATA" will match.  I think you're better off using a single container to store your string/type cross references, tokenizing "value" and doing a ao2_find.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16071/comment/74eb6ece_c6d1dd1a">Patch Set #2, Line 294:</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;">               if ((datastore = ast_channel_datastore_find(chan, &frame_drop_datastore, NULL))) {<br>                        id = datastore->data;<br>                      ast_framehook_detach(chan, *id);<br>                      ast_channel_datastore_remove(chan, datastore);<br>                        ast_datastore_free(datastore);<br>                }<br><br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">It'd probably be good to add a note to the XML documentation that subsequent calls to FRAME_DROP will replace earlier ones.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16071">change 16071</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/+/16071"/><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: I8147c9d55d74e2e48861edba6b22f930920541ec </div>
<div style="display:none"> Gerrit-Change-Number: 16071 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.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-Attention: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 21 Jun 2021 12:57:48 +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>