<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8209">View Change</a></p><p>Patch set 7:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(3 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8209/7/include/asterisk/mod_format.h">File include/asterisk/mod_format.h:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8209/7/include/asterisk/mod_format.h@47">Patch Set #7, Line 47:</a> <code style="font-family:monospace,monospace"> char mime_types[80]; /*!< MIME Types related to the format (separated by | if more than one)*/</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Adding this breaks ABI by shifting everything down. Also you cannot add it to the end of the struct as you have no way to determine if a third-party's precompiled module has the field. If the module doesn't have the field you would be reading garbage.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Because you have to add something to this public struct this patch cannot go into anything other than master.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8209/7/main/media_cache.c">File main/media_cache.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8209/7/main/media_cache.c@133">Patch Set #7, Line 133:</a> <code style="font-family:monospace,monospace">static void normalize_content_type_header(const char *content_type)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">content_type cannot be const because it is modified by params.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8209/7/main/media_cache.c@177">Patch Set #7, Line 177:</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;"> char *mime_type = ast_strdup(header->value);<br> if (mime_type) {<br> normalize_content_type_header(mime_type);<br> if (ast_get_extension_for_mime_type(mime_type, found_ext, sizeof(found_ext))) {<br> ext = found_ext;<br> }<br> ast_free(mime_type);<br> }<br> }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">normalize_content_type_header() could return mime_type as an empty string which is not a good thing as it will match everything that has an empty mime list string.</p><p style="white-space: pre-wrap; word-wrap: break-word;">char *mime_type;</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mime_type = ast_strdup(header->value);<br>if (mime_type) {<br> normalize_content_type_header(mime_type);<br>}<br>if (!ast_strlen_zero(mime_type)) {<br> if (ast_get_extension_for_mime_type(mime_type, found_ext, sizeof(found_ext))) {<br> ext = found_ext;<br> }<br>}<br>ast_free(mime_type);</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8209">change 8209</a>. To unsubscribe, 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/8209"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I1b14692a49b2c1ac67688f58757184122e92ba89 </div>
<div style="display:none"> Gerrit-Change-Number: 8209 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Gaurav Khurana <gkhurana@godaddy.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matt Jordan <mjordan@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 30 Apr 2018 16:53:40 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>