]> git.ipfire.org Git - thirdparty/asterisk.git/commit
config: Allow options to register when documentation is unavailable. 37/2137/1
authorJoshua Colp <jcolp@digium.com>
Mon, 25 Jan 2016 15:35:21 +0000 (11:35 -0400)
committerJoshua Colp <jcolp@digium.com>
Mon, 1 Feb 2016 19:59:40 +0000 (13:59 -0600)
commit7d581b32e982eb45f3164e538fc043f1fe71807c
tree9519b2066f21c17b75d5db0213559e978dd5744a
parent22eb1b48c03037a823a25d1f4ca86077a432c30a
config: Allow options to register when documentation is unavailable.

The config options framework is strict in that configuration options must
be documented unless XML documentation support is not available. In
practice this is useful as it ensures documentation exists however in
off-nominal cases this can cause strange problems.

If it is expected that a config option has a non-zero or non-empty
default value but the config option documentation is unavailable
this reasonable expectation will not be met. This can cause obscure
crashes and weirdness depending on how the code handles it.

This change tweaks the behavior to ensure that the config option
is still allowed to register, apply default values, and be set when
devmode is not enabled. If devmode is enabled then the option can
NOT be set.

This also does not remove the initial documentation error message that
is output on load when registering the configuration option.

ASTERISK-25725 #close

Change-Id: Iec42fca6b35f31326c33fcdc25473f6fd7bc8af8
(cherry picked from commit f22074e5d9ed1882be976299311b8e093d25e1da)
main/config_options.c