]> git.ipfire.org Git - thirdparty/asterisk.git/commit
sounds_index: Avoid repeatedly reindexing.
authorCorey Farrell <git@cfware.com>
Wed, 6 Dec 2017 20:49:32 +0000 (15:49 -0500)
committerCorey Farrell <git@cfware.com>
Thu, 7 Dec 2017 05:39:02 +0000 (00:39 -0500)
commitdb6602f6f7d7d60a92526f12bf82a8c4f4eb0af4
treea160b292f1bc51c53a432909590afa7d15d5446c
parent8e6aedbdcde92661ac59ef383cd801f8414e229a
sounds_index: Avoid repeatedly reindexing.

The sounds index is rebuilt each time a format is registered or
unregistered.  This causes the index to be repeatedly rebuilt during
startup and shutdown.

This patch significantly reduces the work done by delaying sound index
initialization until after modules are loaded.  This way a reindex only
occurs if a format module is loaded after startup.  We also skip
reindexing when format modules are unloaded during shutdown.

Change-Id: I585fd6ee04200612ab1490dc804f76805f89cf0a
main/asterisk.c
main/sounds_index.c