Skip to content

cfgutils: fix async sleep()/usleep() doc examples#4110

Merged
bogdan-iancu merged 1 commit into
OpenSIPS:masterfrom
NormB:fix/cfgutils-async-sleep-docs
Jul 16, 2026
Merged

cfgutils: fix async sleep()/usleep() doc examples#4110
bogdan-iancu merged 1 commit into
OpenSIPS:masterfrom
NormB:fix/cfgutils-async-sleep-docs

Conversation

@NormB

@NormB NormB commented Jul 14, 2026

Copy link
Copy Markdown
Member

The async sleep/usleep examples still used the pre-3.0 string-style parameters (sleep("5"), usleep("1000")). Since the typed module interface, both functions declare CMD_PARAM_INT, so the quoted form fails at startup with:

ERROR:core:fix_cmd: Param [1] expected to be an integer or variable
ERROR:core:fix_actions: Failed to fix command

Use integer parameters, matching the synchronous examples.

Summary

Details

Solution

Compatibility

Closing issues

@NormB
NormB requested a review from liviuchircu July 14, 2026 07:21
@razvancrainea

Copy link
Copy Markdown
Member

@NormB Thanks for spotting the docs typos!
We are currently working on a whole documentation refactoring, where the .xml files will be fully replaced by README.md, thus the changes would become obsolete. Would you mind updating this PR to fix the README.md file as well?

Thank you!
Răzvan

@razvancrainea razvancrainea self-assigned this Jul 14, 2026
The async sleep/usleep examples still used the pre-3.0 string-style
parameters (sleep("5"), usleep("1000")). Since the typed module
interface, both functions declare CMD_PARAM_INT, so the quoted form
fails at startup with:

  ERROR:core:fix_cmd: Param [1] expected to be an integer or variable
  ERROR:core:fix_actions: Failed to fix command <sleep>

Use integer parameters, matching the synchronous examples.
@NormB
NormB force-pushed the fix/cfgutils-async-sleep-docs branch from 0aced82 to a6f4e38 Compare July 14, 2026 18:23
@NormB

NormB commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

Always happy to help.

Norm

@bogdan-iancu
bogdan-iancu merged commit 2c8760d into OpenSIPS:master Jul 16, 2026
95 checks passed
@bogdan-iancu

Copy link
Copy Markdown
Member

Thank you @NormB

@bogdan-iancu bogdan-iancu added this to the 4.1.0-beta milestone Jul 16, 2026
bogdan-iancu added a commit that referenced this pull request Jul 16, 2026
cfgutils: fix async sleep()/usleep() doc examples
(cherry picked from commit 2c8760d)
bogdan-iancu added a commit that referenced this pull request Jul 16, 2026
cfgutils: fix async sleep()/usleep() doc examples
(cherry picked from commit 2c8760d)
@NormB
NormB deleted the fix/cfgutils-async-sleep-docs branch July 16, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants