diff options
-rw-r--r-- | main/channel.c | 6 | ||||
-rw-r--r-- | res/res_corosync.c | 4 | ||||
-rw-r--r-- | res/res_pjsip_nat.c | 4 |
3 files changed, 4 insertions, 10 deletions
diff --git a/main/channel.c b/main/channel.c index fbdf17bd3..935ac2835 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3905,11 +3905,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) switch (f->frametype) { case AST_FRAME_CONTROL: if (f->subclass.integer == AST_CONTROL_ANSWER) { - if (!ast_test_flag(ast_channel_flags(chan), AST_FLAG_OUTGOING)) { - ast_debug(1, "Ignoring answer on an inbound call!\n"); - ast_frfree(f); - f = &ast_null_frame; - } else if (prestate == AST_STATE_UP && ast_channel_is_bridged(chan)) { + if (prestate == AST_STATE_UP && ast_channel_is_bridged(chan)) { ast_debug(1, "Dropping duplicate answer!\n"); ast_frfree(f); f = &ast_null_frame; diff --git a/res/res_corosync.c b/res/res_corosync.c index 0b3a61f62..6642acd2c 100644 --- a/res/res_corosync.c +++ b/res/res_corosync.c @@ -863,7 +863,6 @@ static void cleanup_module(void) static int load_module(void) { cs_error_t cs_err; - enum ast_module_load_result res = AST_MODULE_LOAD_FAILURE; struct cpg_name name; corosync_aggregate_topic = stasis_topic_create("corosync_aggregate_topic"); @@ -885,7 +884,6 @@ static int load_module(void) if (load_config(0)) { /* simply not configured is not a fatal error */ - res = AST_MODULE_LOAD_DECLINE; goto failed; } @@ -926,7 +924,7 @@ static int load_module(void) failed: cleanup_module(); - return res; + return AST_MODULE_LOAD_DECLINE; } static int unload_module(void) diff --git a/res/res_pjsip_nat.c b/res/res_pjsip_nat.c index fadefd86a..483caa2d2 100644 --- a/res/res_pjsip_nat.c +++ b/res/res_pjsip_nat.c @@ -63,7 +63,7 @@ static int rewrite_route_set(pjsip_rx_data *rdata, pjsip_dialog *dlg) if (rr) { uri = pjsip_uri_get_uri(&rr->name_addr); rewrite_uri(rdata, uri); - if (dlg && dlg->route_set.next && !dlg->route_set_frozen) { + if (dlg && !pj_list_empty(&dlg->route_set) && !dlg->route_set_frozen) { pjsip_routing_hdr *route = dlg->route_set.next; uri = pjsip_uri_get_uri(&route->name_addr); rewrite_uri(rdata, uri); @@ -85,7 +85,7 @@ static int rewrite_contact(pjsip_rx_data *rdata, pjsip_dialog *dlg) rewrite_uri(rdata, uri); - if (dlg && !dlg->route_set_frozen && (!dlg->remote.contact + if (dlg && pj_list_empty(&dlg->route_set) && (!dlg->remote.contact || pjsip_uri_cmp(PJSIP_URI_IN_REQ_URI, dlg->remote.contact->uri, contact->uri))) { dlg->remote.contact = (pjsip_contact_hdr*)pjsip_hdr_clone(dlg->pool, contact); dlg->target = dlg->remote.contact->uri; |