res_pjsip: Don't assume a request will have any addresses.
authorJoshua Colp <jcolp@digium.com>
Tue, 13 Sep 2016 11:08:18 +0000 (07:08 -0400)
committerJoshua Colp <jcolp@digium.com>
Tue, 13 Sep 2016 11:10:06 +0000 (06:10 -0500)
commite3487b9360bc48c9bf777bef18f19f8a8fcc7a62
tree6dedd3237ee794f006bab7aa48e19fde3f29c5e5
parent7d7b23f04f2d45a531afd8fd8d0a172ab8411932
res_pjsip: Don't assume a request will have any addresses.

When performing DNS resolution the failover code present in
res_pjsip currently assumes that a request will always have
at least one viable address. In practice this is not true.
A domain may be used that has no records.

The code now checks that at least one address exists on the
request which prevents looping.

ASTERISK-26364 #close

Change-Id: Ic0761b0264864acd85915c94d878a81624940f4c
res/res_pjsip.c