]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_musiconhold.c: Use ast_file_read_dir to scan MoH directory
authorSean Bright <sean.bright@gmail.com>
Fri, 7 Aug 2020 14:31:01 +0000 (10:31 -0400)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 25 Aug 2020 14:50:15 +0000 (09:50 -0500)
commit315b5f3929448fd140c6a47eb34ae29d3c7be553
tree94841cc55a6cb12dc6c231f97df63188ff671a4f
parent393444fc205d1a2d8173735e133f22e07f228bf8
res_musiconhold.c: Use ast_file_read_dir to scan MoH directory

Two changes of note in this patch:

* Use ast_file_read_dir instead of opendir/readdir/closedir

* If the files list should be sorted, do that at the end rather than as
  we go which improves performance for large lists

Change-Id: Ic7e9c913c0f85754c99c74c9cf6dd3514b1b941f
res/res_musiconhold.c