[asterisk-commits] kmoore: branch 13 r424833 - /branches/13/main/sounds_index.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 8 09:54:36 CDT 2014
Author: kmoore
Date: Wed Oct 8 09:54:29 2014
New Revision: 424833
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424833
Log:
Indexer: Format message types may not exist
In Asterisk 13+, any given message type is not guaranteed to exist even
if Asterisk comes up correctly since creation of the message type could
be declined. The indexer should not prevent Asterisk from starting
under these conditions.
Modified:
branches/13/main/sounds_index.c
Modified: branches/13/main/sounds_index.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/main/sounds_index.c?view=diff&rev=424833&r1=424832&r2=424833
==============================================================================
--- branches/13/main/sounds_index.c (original)
+++ branches/13/main/sounds_index.c Wed Oct 8 09:54:29 2014
@@ -302,17 +302,21 @@
return -1;
}
- res |= stasis_message_router_add(
- sounds_system_router,
- ast_format_register_type(),
- format_update_cb,
- NULL);
-
- res |= stasis_message_router_add(
- sounds_system_router,
- ast_format_unregister_type(),
- format_update_cb,
- NULL);
+ if (ast_format_register_type()) {
+ res |= stasis_message_router_add(
+ sounds_system_router,
+ ast_format_register_type(),
+ format_update_cb,
+ NULL);
+ }
+
+ if (ast_format_unregister_type()) {
+ res |= stasis_message_router_add(
+ sounds_system_router,
+ ast_format_unregister_type(),
+ format_update_cb,
+ NULL);
+ }
if (res) {
return -1;
More information about the asterisk-commits
mailing list