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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2014-10-08 14:54:29 +00:00
parent 57a5e2ebee
commit 9e08180304

View File

@@ -302,17 +302,21 @@ int ast_sounds_index_init(void)
return -1; return -1;
} }
res |= stasis_message_router_add( if (ast_format_register_type()) {
sounds_system_router, res |= stasis_message_router_add(
ast_format_register_type(), sounds_system_router,
format_update_cb, ast_format_register_type(),
NULL); format_update_cb,
NULL);
}
res |= stasis_message_router_add( if (ast_format_unregister_type()) {
sounds_system_router, res |= stasis_message_router_add(
ast_format_unregister_type(), sounds_system_router,
format_update_cb, ast_format_unregister_type(),
NULL); format_update_cb,
NULL);
}
if (res) { if (res) {
return -1; return -1;