]> git.ipfire.org Git - thirdparty/asterisk.git/commit
config: Allow options to register when documentation is unavailable. 77/2077/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:10:50 +0000 (13:10 -0400)
commitf22074e5d9ed1882be976299311b8e093d25e1da
treee3c001214e03b31e50599676fcbb541672f8d474
parentc9a0f4f8ff9785657caee25a1b1a2d1bc6f9f047
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