[Asterisk-code-review] media index.c: Refactored so it doesn't cache the index (asterisk[master])

Corey Farrell asteriskteam at digium.com
Mon Jan 28 09:13:16 CST 2019


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/10924 )

Change subject: media_index.c: Refactored so it doesn't cache the index
......................................................................


Patch Set 1: Code-Review-1

(7 comments)

https://gerrit.asterisk.org/#/c/10924/1//COMMIT_MSG
Commit Message:

https://gerrit.asterisk.org/#/c/10924/1//COMMIT_MSG@31
PS1, Line 31: ast_sounds_reindex() is now a no-op but left for backwards
            : compatibility.
This does not apply to master.


https://gerrit.asterisk.org/#/c/10924/1/include/asterisk/media_index.h
File include/asterisk/media_index.h:

https://gerrit.asterisk.org/#/c/10924/1/include/asterisk/media_index.h@102
PS1, Line 102: int ast_media_index_update(struct ast_media_index *index,
For master only lets replace this with a macro, wire it directly to ast_media_index_update_for_file with filename = NULL.


https://gerrit.asterisk.org/#/c/10924/1/main/sounds.c
File main/sounds.c:

https://gerrit.asterisk.org/#/c/10924/1/main/sounds.c@241
PS1, Line 241: 			ao2_ref(sounds_index, -1);
ao2_cleanup(variants)


https://gerrit.asterisk.org/#/c/10924/1/main/sounds.c@276
PS1, Line 276: 		return 1;
Nit: return AST_MODULE_LOAD_DECLINE in 16 and master.


https://gerrit.asterisk.org/#/c/10924/1/main/sounds.c@279
PS1, Line 279: 	return 0;
Nit: return AST_MODULE_LOAD_SUCCESS in 16 and master.


https://gerrit.asterisk.org/#/c/10924/1/main/sounds.c@331
PS1, Line 331: 	ao2_cleanup(failed_index);
Move this into `if (failed_index)` block and just use ao2_ref.


https://gerrit.asterisk.org/#/c/10924/1/main/sounds.c@340
PS1, Line 340: 	/* This reload doesn't use config so this module doesn't require "extconfig". */
             : 	.reload = reload_module,
This should be removed so that CLI 'module reload sounds' is deleted.  Probably worth adding a separate comment to CHANGES or even UPGRADE.txt.

This comment does not apply to 16.



-- 
To view, visit https://gerrit.asterisk.org/10924
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1cef327ba1b0648d85d218b70ce469ad07f4aa8d
Gerrit-Change-Number: 10924
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Comment-Date: Mon, 28 Jan 2019 15:13:16 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190128/c77a0035/attachment.html>


More information about the asterisk-code-review mailing list