]> git.ipfire.org Git - thirdparty/asterisk.git/commit
config: Allow options to register when documentation is unavailable. 78/2078/2
authorJoshua Colp <jcolp@digium.com>
Mon, 25 Jan 2016 15:35:21 +0000 (11:35 -0400)
committerJoshua Colp <jcolp@digium.com>
Tue, 26 Jan 2016 17:16:55 +0000 (11:16 -0600)
commit1dfd104a276459bf5c7ad07c4f9615b4b8c5e2d4
tree5fb35d5b40eed0ef40e71ea84fa6c569a3b8f600
parentf8bf72a417bf5e6d6149b657fa806174b82430ce
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
main/config_options.c