dns: Fix pointer increment in dns_parse_answer_ex
authorGeorge Joseph <george.joseph@fairview5.com>
Mon, 16 Nov 2015 22:10:20 +0000 (15:10 -0700)
committerGeorge Joseph <george.joseph@fairview5.com>
Mon, 16 Nov 2015 22:10:20 +0000 (15:10 -0700)
commit6919daab61142e74f8313def68310465d7be998e
treeb649e4474789adc6bdec5ec081fa56941bdc3ef6
parenta1fcf6f7b28caf8e2f9b808449c86515e2ef90c4
dns: Fix pointer increment in dns_parse_answer_ex

When dns_parse_answer_ex was iterating over the answers it
wasn't incrementing the answer pointer correctly after the first
answer.  The result was that no answers after the first
were being returned.  For results where multiple records should
have been sorted by priority, weight, etc., there was nothing
to sort so the only the first record was returned even if it
wouldn't have been the correct record based on the sort.

ASTERISK-25565 #close
Reported-by: Daniel Tryba
Tested-by George Joseph

Change-Id: I8622604fefdcd3c11e2c5609a6382e53b1467b0b
main/dns.c