mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
Fixes an issue with Music on Hold classes losing files in playlist when realtime is used.
The bug occurs rather intermittently and I relied on the reporters to test the patch.
After a sanity check and some testing, I'm giving it an OK.
(closes issue ASTERISK-17875)
Reported by: David Cunningham
Patches:
res_musiconhold.c.mohrt17875_v1 uploaded by Igor Goncharovsky (license #5009)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@325821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1625,14 +1625,15 @@ static int load_moh_classes(int reload)
|
||||
|
||||
cfg = ast_config_load("musiconhold.conf", config_flags);
|
||||
|
||||
if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID) {
|
||||
if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEINVALID) {
|
||||
if (ast_check_realtime("musiconhold") && reload) {
|
||||
ao2_t_callback(mohclasses, OBJ_NODATA, moh_class_mark, NULL, "Mark deleted classes");
|
||||
ao2_t_callback(mohclasses, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE, moh_classes_delete_marked, NULL, "Purge marked classes");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (cfg == CONFIG_STATUS_FILEUNCHANGED) {
|
||||
moh_rescan_files();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user