[Asterisk-code-review] app_voicemail.c: Fix check on forwarded voicemail-to-email message body (...asterisk[13])

Kevin Harwell asteriskteam at digium.com
Mon Oct 21 13:49:41 CDT 2019


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13085 )

Change subject: app_voicemail.c: Fix check on forwarded voicemail-to-email message body
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/13085/1/apps/app_voicemail.c 
File apps/app_voicemail.c:

https://gerrit.asterisk.org/#/c/13085/1/apps/app_voicemail.c@5386 
PS1, Line 5386: 		char fromdir[256], fromfile[256], origdate[80] = "", origcallerid[80] = "", origmailbox[80] = "";
Is "origmailbox" just the voicemail ID minus the context portion? I think it is. If so the length is probably fine. However, it would be better to use MAX_VM_MBOX_ID_LEN, or MAX_VM_MAILBOX_LEN (if includes '@context').


https://gerrit.asterisk.org/#/c/13085/1/apps/app_voicemail.c@5417 
PS1, Line 5417: 			} else {
              : 				fprintf(p, "Dear %s:" ENDL ENDL "\tJust wanted to let you know you were just left a "
              : 					"%s long message (number %d)" ENDL "in mailbox %s from %s, on %s so you might" ENDL
              : 					"want to check it when you get a chance.  Thanks!" ENDL ENDL "\t\t\t\t--Asterisk"
              : 					ENDL ENDL, vmu->fullname, dur, msgnum + 1, mailbox,
              : 					(cidname ? cidname : (cidnum ? cidnum : "an unknown caller")), date);
              : 			}
It appears the logic for outputting of this message has changed. Before the "plain message" was written if the given mailbox matched the vmu->mailbox, or the configuration couldn't load. Now it is only written if the given mailbox and configured mailbox match. Seems like you'd still want write it out if the configuration didn't load as well, or was this intentional?



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Ife1c9ec8e7529b4d5da7f0ccf9b95cebcd5a6009
Gerrit-Change-Number: 13085
Gerrit-PatchSet: 1
Gerrit-Owner: cmaj <chris at penguinpbx.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Mon, 21 Oct 2019 18:49:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191021/f47fce8c/attachment-0001.html>


More information about the asterisk-code-review mailing list