<p>George Joseph <strong>uploaded patch set #3</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/10923">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">media_index.c: Refactored so it doesn't cache the index<br><br>Testing revealed that the cache added no benefit but that it could<br>consume excessive memory.<br><br>Two new index related functions were created:<br>ast_sounds_get_index_for_file() and ast_media_index_update_for_file()<br>which restrict index updating to specific sound files.<br><br>The original ast_sounds_get_index() and ast_media_index_update()<br>calls are still available but since they no longer cache the results<br>internally, developers should re-use an index they may already have<br>instead of calling ast_sounds_get_index() repeatedly.  If information<br>for only a single file is needed, ast_sounds_get_index_for_file()<br>should be called instead of ast_sounds_get_index().<br><br>The media_index directory scan code was elimininated in favor of<br>using the existing ast_file_read_dirs() function.<br><br>Since there's no more cache, ast_sounds_index_init now only<br>registers the sounds cli commands instead of generating the<br>initial index and subscribing to stasis format register/unregister<br>messages.<br><br>"sounds" is no longer a valid target for the "module reload"<br>command.<br><br>Both the sounds cli commands and the sounds ari resources were<br>refactored to only call ast_sounds_get_index() once per invocation<br>and to use ast_sounds_get_index_for_file() when a specific sound<br>file is requested.<br><br>Change-Id: I1cef327ba1b0648d85d218b70ce469ad07f4aa8d<br>---<br>M CHANGES<br>M include/asterisk/media_index.h<br>M include/asterisk/sounds_index.h<br>M main/media_index.c<br>M main/sounds.c<br>M res/ari/resource_sounds.c<br>6 files changed, 277 insertions(+), 207 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/23/10923/3</pre><p>To view, visit <a href="https://gerrit.asterisk.org/10923">change 10923</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10923"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I1cef327ba1b0648d85d218b70ce469ad07f4aa8d </div>
<div style="display:none"> Gerrit-Change-Number: 10923 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>