[asterisk-dev] [Code Review] 3837: app_voicemail: use consistent generator string when updating voicemail.conf

Scott Griepentrog reviewboard at asterisk.org
Tue Jul 22 13:00:24 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3837/
-----------------------------------------------------------

Review request for Asterisk Developers.


Repository: Asterisk


Description
-------

This is related to https://reviewboard.asterisk.org/r/3708/ - "inform config hook of configuration change when writing file".

The generator string that app_voicemail passes to ast_config_text_file_save() is not consistent with either it's actual name or other usage of ast_config_* functions.  This patch changes the generator argument "AppVoicemail" to "app_voicemail" when writing out a new copy of the voicemail.conf file when a pin code is changed, which enables a single configuration hook to catch both reads from and writes to voicemail.conf.

As a side effect, when the voicemail.conf file is written, the header comment line showing the Generator: is also updated (see below).  This is not expected to cause any problems, and is the only other usage of the generator parameter.

;!
;! Automatically generated configuration file
;! Filename: voicemail.conf (/etc/asterisk/voicemail.conf)
;! Generator: app_voicemail
;! Creation Date: Tue Jul 22 12:32:44 2014


Diffs
-----

  /branches/11/apps/app_voicemail.c 419195 

Diff: https://reviewboard.asterisk.org/r/3837/diff/


Testing
-------


Thanks,

Scott Griepentrog

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140722/3984cb1b/attachment.html>


More information about the asterisk-dev mailing list