Fix stuck channel in ARI through the introduction of synchronous bridge actions.
[asterisk/asterisk.git] / res / res_mwi_external.c
index c3fc0ea..875f327 100644 (file)
@@ -163,10 +163,8 @@ static int mwi_sorcery_init(void)
        }
 
        /* Map the external MWI wizards. */
-       res = !!ast_sorcery_apply_config(mwi_sorcery, "res_mwi_external");
-       res &= !!ast_sorcery_apply_default(mwi_sorcery, MWI_MAILBOX_TYPE, "astdb",
-               MWI_ASTDB_PREFIX);
-       if (res) {
+       if (ast_sorcery_apply_default(mwi_sorcery, MWI_MAILBOX_TYPE, "astdb",
+                       MWI_ASTDB_PREFIX) == AST_SORCERY_APPLY_FAIL) {
                ast_log(LOG_ERROR, "MWI external: Sorcery could not setup wizards.\n");
                return -1;
        }