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

res_phreaknet: iax.conf, et. al. are truncated when there is no disk space left #11

Open
InterLinked1 opened this issue Feb 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@InterLinked1
Copy link
Owner

If there is no disk space left, and res_phreaknet attempts to update IAX config files, it will be unable to successfully write any data and as a result, all the IAX config files are truncated to 0 bytes when they are updated.

A simple fix would be to detect the low disk space condition (< 1MB) and not attempt to do any file I/O in this situation. However, this could be subject to race conditions and doesn't feel like a completely proper fix for this.

Because we're using ast_config_text_file_save2, we can't directly handle this scenario in this module, such as by writing to a temp file first, ensuring we wrote everything we meant to write, and then renaming the file, at least without working around it in some other way.

@InterLinked1 InterLinked1 added the bug Something isn't working label Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant