diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_queue.c | 20 | ||||
-rw-r--r-- | apps/app_stack.c | 8 | ||||
-rw-r--r-- | apps/app_voicemail.c | 4 |
3 files changed, 13 insertions, 19 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 9227423a4..e32caa78d 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4256,18 +4256,16 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce else which = peer; ast_channel_unlock(qe->chan); - if (ast_monitor_start) { - if (monitorfilename) { - ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT); - } else if (qe->chan->cdr && ast_monitor_start) { - ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1, X_REC_IN | X_REC_OUT); - } else if (ast_monitor_start) { - /* Last ditch effort -- no CDR, make up something */ - snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random()); - ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT); - } + if (monitorfilename) { + ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT); + } else if (qe->chan->cdr) { + ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1, X_REC_IN | X_REC_OUT); + } else { + /* Last ditch effort -- no CDR, make up something */ + snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random()); + ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT); } - if (!ast_strlen_zero(monexec) && ast_monitor_setjoinfiles) { + if (!ast_strlen_zero(monexec)) { ast_monitor_setjoinfiles(which, 1); } } else { diff --git a/apps/app_stack.c b/apps/app_stack.c index bc3054d3f..100a59603 100644 --- a/apps/app_stack.c +++ b/apps/app_stack.c @@ -647,9 +647,7 @@ struct agi_command gosub_agi_command = static int unload_module(void) { - if (ast_agi_unregister) { - ast_agi_unregister(ast_module_info->self, &gosub_agi_command); - } + ast_agi_unregister(ast_module_info->self, &gosub_agi_command); ast_unregister_application(app_return); ast_unregister_application(app_pop); @@ -663,9 +661,7 @@ static int unload_module(void) static int load_module(void) { - if (ast_agi_register) { - ast_agi_register(ast_module_info->self, &gosub_agi_command); - } + ast_agi_register(ast_module_info->self, &gosub_agi_command); ast_register_application_xml(app_pop, pop_exec); ast_register_application_xml(app_return, return_exec); diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 824c42532..1c14f2e4f 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -10699,10 +10699,10 @@ static int load_config(int reload) if ((val = ast_variable_retrieve(cfg, "general", "smdienable")) && ast_true(val)) { ast_debug(1, "Enabled SMDI voicemail notification\n"); if ((val = ast_variable_retrieve(cfg, "general", "smdiport"))) { - smdi_iface = ast_smdi_interface_find ? ast_smdi_interface_find(val) : NULL; + smdi_iface = ast_smdi_interface_find(val); } else { ast_debug(1, "No SMDI interface set, trying default (/dev/ttyS0)\n"); - smdi_iface = ast_smdi_interface_find ? ast_smdi_interface_find("/dev/ttyS0") : NULL; + smdi_iface = ast_smdi_interface_find("/dev/ttyS0"); } if (!smdi_iface) { ast_log(AST_LOG_ERROR, "No valid SMDI interface specfied, disabling SMDI voicemail notification\n"); |