[svn-commits] jrose: branch 1.8 r325821 - /branches/1.8/res/res_musiconhold.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 30 14:17:47 CDT 2011


Author: jrose
Date: Thu Jun 30 14:17:32 2011
New Revision: 325821

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=325821
Log:
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)

Modified:
    branches/1.8/res/res_musiconhold.c

Modified: branches/1.8/res/res_musiconhold.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_musiconhold.c?view=diff&rev=325821&r1=325820&r2=325821
==============================================================================
--- branches/1.8/res/res_musiconhold.c (original)
+++ branches/1.8/res/res_musiconhold.c Thu Jun 30 14:17:32 2011
@@ -1625,14 +1625,15 @@
 
 	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");
 		}
-		if (cfg == CONFIG_STATUS_FILEUNCHANGED) {
-			moh_rescan_files();
-		}
+		return 0;
+	}
+	if (cfg == CONFIG_STATUS_FILEUNCHANGED) {
+		moh_rescan_files();
 		return 0;
 	}
 




More information about the svn-commits mailing list