Use params_value instead of params_value_bool for allow_simultaneous_ips #2813
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What:
Use
params_value()
instead ofparams_value_bool()
for gettingallow_simultaneous_ips
.Why:
Although the underlying value is bool we should not use params_value_bool for retrieving the value of reverse_lookup_only because it would break the mechanism of setting a default value for the setting.
params_value() returns a string ("0" or "1") if there is an value and NULL if not. params_value_bool() return 0 if the value is "0"
OR there is no value. This means that if we want to be able to set a default if there is no value (NULL) we need to use params_value() else the information is lost.
Fix crash.
How:
Created target with and without PR. Without PR gsad crashes.
Checklist: