Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_read() and file_write() contain no documentation on return values #3314

Closed
dilyanpalauzov opened this issue Dec 17, 2022 · 1 comment
Closed

Comments

@dilyanpalauzov
Copy link
Contributor

According to https://www.kamailio.org/docs/modules/5.6.x/modules/corex.html#corex.f.file_read the functions cores.file_read() and cores.file_write() do not return a value (return void). The examples after functions are if (file_write("z', "z")) {...}. Since the functions appear in if () they return se value.

  • document the return values of both functions
@miconda
Copy link
Member

miconda commented Dec 18, 2022

While in generally it would be good to have the return codes explicitly in readme, it is not a requirement. Having a report on tracker for each function is not feasable, if one wants to document, the source code is available and PRs can be made.

Otherwise, as general rule, if a function succeeds, returns positive (true) and if it fails, returns negative (false).

@miconda miconda closed this as completed Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants