Add a WARNING in bridge_softmix when a timing module isn't loaded
authorMatthew Jordan <mjordan@digium.com>
Wed, 18 Sep 2013 17:21:39 +0000 (17:21 +0000)
committerMatthew Jordan <mjordan@digium.com>
Wed, 18 Sep 2013 17:21:39 +0000 (17:21 +0000)
If bridge_softmix fails to be created because no timing source is present in
Asterisk, this will currently fail gracefully but with (most likely) a generic
error message by whatever module tried to create the softmix bridge. This
patch adds a more explicit warning so you can actually diagnose and fix the
problem.

Review: https://reviewboard.asterisk.org/r/2857/
........

Merged revisions 399353 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 399365 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399368 65c4cc65-6c06-0410-ace0-fbb531ad65f3

bridges/bridge_softmix.c

index e5835f7..c6cde39 100644 (file)
@@ -1044,6 +1044,7 @@ static int softmix_bridge_create(struct ast_bridge *bridge)
        ast_mutex_init(&softmix_data->lock);
        softmix_data->timer = ast_timer_open();
        if (!softmix_data->timer) {
+               ast_log(AST_LOG_WARNING, "Failed to open timer for softmix bridge\n");
                softmix_bridge_data_destroy(softmix_data);
                return -1;
        }