[Asterisk-code-review] app_voicemail: Refactor email generation functions (asterisk[master])

N A asteriskteam at digium.com
Mon Nov 1 14:46:57 CDT 2021


Attention is currently required from: Sean Bright, Joshua Colp, Stanislav Abramenkov, George Joseph.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16665 )

Change subject: app_voicemail: Refactor email generation functions
......................................................................


Patch Set 3:

(4 comments)

File include/asterisk/mail.h:

https://gerrit.asterisk.org/c/asterisk/+/16665/comment/6e5a4b05_5f1bf2a9 
PS1, Line 26: /usr/sbin/sendmail
> Not sure if this makes any difference, but SENDMAIL is just a macro to the location of sendmail. […]
Ack


File include/asterisk/utils.h:

https://gerrit.asterisk.org/c/asterisk/+/16665/comment/bb674ed8_ea305d0f 
PS3, Line 198: #define SENDMAIL "/usr/sbin/sendmail -t"
             : #define ENDL "\n"
> > These do not need to be here. There can be in utils.c […]
SENDMAIL is the same as ENDL, except it's not even used in utils, it's only used in the modules that are including that header file - e.g. app_voicemail, app_minivm, app_mail, etc.

So either they can be in utils.h once, or they can be redefined in every module using them.

I didn't remove the ENDL macro from app_voicemail, but it could also be removed from there and other modules and just left in utils.h

SENDMAIL I feel should stay in utils.h since utils does not use SENDMAIL at all internally. It is solely used by modules including the header file.


File include/asterisk/utils.h:

https://gerrit.asterisk.org/c/asterisk/+/16665/comment/24e5999a_b30d5d96 
PS2, Line 197: 
             : #define BASELINELEN 72
             : #define BASEMAXINLINE 256
             : #define SENDMAIL "/usr/sbin/sendmail -t"
             : #define ENDL "\n"
> You can move this to mail. […]
Ack


File main/utils.c:

https://gerrit.asterisk.org/c/asterisk/+/16665/comment/5c25ff12_16d1e6f6 
PS2, Line 639: int ast_file_base_encode(char *filename, FILE *so)
> Perhaps, but I wasn't too sure about it. ast_base64_encode uses a string input, not a file input. […]
Ack



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16665
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I1de0ed3483623e9599711129edc817c45ad237ee
Gerrit-Change-Number: 16665
Gerrit-PatchSet: 3
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-CC: Stanislav Abramenkov <stas.abramenkov at gmail.com>
Gerrit-Attention: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Stanislav Abramenkov <stas.abramenkov at gmail.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Mon, 01 Nov 2021 19:46:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sean Bright <sean at seanbright.com>
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Stanislav Abramenkov <stas.abramenkov at gmail.com>
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211101/fb3c8c82/attachment-0001.html>


More information about the asterisk-code-review mailing list