[svn-commits] kmoore: trunk r424834 - in /trunk: ./ main/sounds_index.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Oct 8 09:54:56 CDT 2014


Author: kmoore
Date: Wed Oct  8 09:54:54 2014
New Revision: 424834

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424834
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.
........

Merged revisions 424833 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/main/sounds_index.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/main/sounds_index.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/sounds_index.c?view=diff&rev=424834&r1=424833&r2=424834
==============================================================================
--- trunk/main/sounds_index.c (original)
+++ trunk/main/sounds_index.c Wed Oct  8 09:54:54 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 svn-commits mailing list