Merge "res_pjsip: Don't assume a request will have any addresses."

This commit is contained in:
zuul
2016-09-13 18:24:44 -05:00
committed by Gerrit Code Review

View File

@@ -3584,7 +3584,7 @@ int ast_sip_failover_request(pjsip_tx_data *tdata)
{
pjsip_via_hdr *via;
if (tdata->dest_info.cur_addr == tdata->dest_info.addr.count - 1) {
if (!tdata->dest_info.addr.count || (tdata->dest_info.cur_addr == tdata->dest_info.addr.count - 1)) {
/* No more addresses to try */
return 0;
}