summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-09-13 18:24:46 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-09-13 18:24:46 -0500
commitd6c9e72c93fdb0d28830dbcd8408891f19553699 (patch)
tree633c7c9e5d3214233fd7524aca3671bc54aec8d1 /res
parent5ddf0862b467609955b4a65185f28a77b66c2e70 (diff)
parentb6207cab24f50135a873cda75fcca57a75d59f45 (diff)
Merge "res_pjsip: Don't assume a request will have any addresses." into 14
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 34edc8ca5..8ecdb0382 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -3578,7 +3578,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;
}