<p> Attention is currently required from: Joshua Colp. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16665">View Change</a></p><p>6 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">Patchset:</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/+/16665?tab=comments">Patch Set #1:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Yes, and there's additional comments.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File include/asterisk/mail.h:</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/+/16665/comment/e18a2cfd_7742257d">Patch Set #1, Line 24:</a> <code style="font-family:monospace,monospace">#define BASELINELEN 72</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">What do these mean within the context of the base encoding?</blockquote></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Well, here is the code where it's used:<br>if (bio->linelength >= BASELINELEN) {<br> if (fputs(ENDL, so) == EOF) {<br> return -1;<br> }</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> bio->linelength = 0;<br> }</pre><p style="white-space: pre-wrap; word-wrap: break-word;">My guess is that since 72 is the magic wrapping number in plain text email, this might have something to do with adding a line break after every 72 characters, or something like that.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16665/comment/0a275320_7c354848">Patch Set #1, Line 36:</a> <code style="font-family:monospace,monospace">int ast_base_encode(char *filename, FILE *so);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Needs a more explicit function name</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16665/comment/d6cd72a8_36f30757">Patch Set #1, Line 40:</a> <code style="font-family:monospace,monospace"> * \param template The template for the unique file name to generate</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Should be documented that the filename is returned in here</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File main/mail.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/+/16665/comment/2ef15e38_c8e9e0ee">Patch Set #1, Line 131:</a> <code style="font-family:monospace,monospace"> while (!hiteof){</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Can this reuse the existing base64 code at all?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Unfortunately, I think not, at least without a bit of rework. The existing code uses an entire string while the existing one goes through a file byte by byte. I'm not sure it would be prudent to try to load potentially a very large attachment all in at once, just to use the existing function. It's different enough that I think it serves its own purpose. Accordingly, I've named it ast_file_base_encode.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16665/comment/c96dd442_e6960d9a">Patch Set #1, Line 178:</a> <code style="font-family:monospace,monospace"> chmod(template, VOICEMAIL_FILE_MODE & ~my_umask);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">If this supports changing permissions then they should be passed in</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Makes sense, I've done the same with the umask as well, so it shouldn't have any direct ties to voicemail at all now.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16665">change 16665</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/+/16665"/><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: I1de0ed3483623e9599711129edc817c45ad237ee </div>
<div style="display:none"> Gerrit-Change-Number: 16665 </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: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 01 Nov 2021 18:11:10 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Comment-In-Reply-To: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>