mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1505,10 +1505,10 @@ static int load_moh_classes(int reload)
|
||||
}
|
||||
|
||||
/* Don't leak a class when it's already registered */
|
||||
moh_register(class, reload);
|
||||
|
||||
if (!moh_register(class, reload)) {
|
||||
numclasses++;
|
||||
}
|
||||
}
|
||||
|
||||
ast_config_destroy(cfg);
|
||||
|
||||
|
Reference in New Issue
Block a user