Skip to content

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

Open
@InterLinked1

Description

@InterLinked1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions