mirror of https://github.com/asterisk/asterisk
When ast_streamfile() failed to open a file it reported strerror(errno), but errno was not set by anything on that path. The value came from whatever syscall ran last, so the message routinely blamed an unrelated error. Drop errno from that message and log at the point of failure instead: filehelper() now reports the fopen() error, which does carry a meaningful errno, and an allocation failure from get_filestream(). Candidate files whose format does not match the channel are logged at debug level only, since filehelper() walks every registered format and skipping the ones that do not match is normal: a sound installed in several formats would otherwise warn on every successful playback. Failures inside the format module's open callback stay unlogged here, as those callbacks already report their own reason. Resolves: #1629pull/2105/head
parent
249fac6f0f
commit
43f6418ddd
Loading…
Reference in new issue