[asterisk-commits] mmichelson: branch 1.6.0 r187047 - in /branches/1.6.0: ./ res/res_musiconhold.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 8 11:52:56 CDT 2009


Author: mmichelson
Date: Wed Apr  8 11:52:52 2009
New Revision: 187047

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=187047
Log:
Merged revisions 187046 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r187046 | mmichelson | 2009-04-08 11:52:20 -0500 (Wed, 08 Apr 2009) | 16 lines
  
  Merged revisions 187045 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r187045 | mmichelson | 2009-04-08 11:52:03 -0500 (Wed, 08 Apr 2009) | 10 lines
    
    Fix a small logical error when loading moh classes.
    
    We were unconditionally incrementing the number of mohclasses
    registered. However, we should actually only increment if the
    call to moh_register was successful.
    
    While this probably has never caused problems, I noticed it
    and decided to fix it anyway.
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/res/res_musiconhold.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/res/res_musiconhold.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/res/res_musiconhold.c?view=diff&rev=187047&r1=187046&r2=187047
==============================================================================
--- branches/1.6.0/res/res_musiconhold.c (original)
+++ branches/1.6.0/res/res_musiconhold.c Wed Apr  8 11:52:52 2009
@@ -1510,9 +1510,9 @@
 		}
 
 		/* Don't leak a class when it's already registered */
-		moh_register(class, reload);
-
-		numclasses++;
+		if (!moh_register(class, reload)) {
+			numclasses++;
+		}
 	}
 
 	ast_config_destroy(cfg);




More information about the asterisk-commits mailing list