[Asterisk-code-review] app_directory: add ability to specify configuration file (asterisk[18])

Richard Mudgett asteriskteam at digium.com
Thu Jan 26 13:29:19 CST 2023


Attention is currently required from: Michael Bradeen.

Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/19794 )

Change subject: app_directory: add ability to specify configuration file
......................................................................


Patch Set 2: Code-Review-1

(3 comments)

File apps/app_directory.c:

https://gerrit.asterisk.org/c/asterisk/+/19794/comment/335dd464_e1ea56e1 
PS2, Line 485: 	cfg = ast_config_load(S_OR(filename, VOICEMAIL_CONFIG), config_flags);
Instead of doing S_OR here just pass filename.  The caller should always specify the file to get the config from.


https://gerrit.asterisk.org/c/asterisk/+/19794/comment/38ba66bf_6c5a5451 
PS2, Line 492: 		ast_log(LOG_ERROR, "Config file %s is in an invalid format.  Aborting.\n", VOICEMAIL_CONFIG);
Need to replace VOICEMAIL_CONFIG with filename.


https://gerrit.asterisk.org/c/asterisk/+/19794/comment/7a08d886_2988c21f 
PS2, Line 877: 	cfg = realtime_directory(args.vmcontext, S_OR(opts[OPT_ARG_FILENAME], ""));
Instead of passing an empty string you should pass VOICEMAIL_CONFIG.  This way you don't need to do another S_OR in realtime_directory().



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

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Id58ccb1344ad1e563fa10db12f172fbd104a9d13
Gerrit-Change-Number: 19794
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Attention: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Comment-Date: Thu, 26 Jan 2023 19:29:19 +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/20230126/db417fea/attachment.html>


More information about the asterisk-code-review mailing list