#2008 c2s_stanza_size_limit returns 'nil' if not set in config
Reporter
TroLUG Team
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Type-Defect
Status-WontFix
Priority-Medium
TroLUG Team
on
What steps will reproduce the problem?
1. prosodyctl shell 'config:get("c2s_stanza_size_limit")'
What is the expected output?
if not set, it should return the default value:
OK: 256000
What do you see instead?
| OK: nil
What version of the product are you using? On what operating system?
13.0.6 on Debian
If parameter is set in config file, the output is as expected.
Zash
on
Thanks for the report.
This behavior is expected, because defaults are properties of the respective modules and applied at config read/module load time, rather than of the config itself. Thus mod_admin_shell doesn't really know what defaults mod_c2s uses instead when it gets the `nil`. Other modules could even have other defaults.
While there are probably ways we could change this, it's not something we have planned and it would be a major change to how Prosody handles the config.
What steps will reproduce the problem? 1. prosodyctl shell 'config:get("c2s_stanza_size_limit")' What is the expected output? if not set, it should return the default value: OK: 256000 What do you see instead? | OK: nil What version of the product are you using? On what operating system? 13.0.6 on Debian If parameter is set in config file, the output is as expected.
Thanks for the report. This behavior is expected, because defaults are properties of the respective modules and applied at config read/module load time, rather than of the config itself. Thus mod_admin_shell doesn't really know what defaults mod_c2s uses instead when it gets the `nil`. Other modules could even have other defaults. While there are probably ways we could change this, it's not something we have planned and it would be a major change to how Prosody handles the config.
Changes