diff options
author | Alexander Bokovoy <ab@samba.org> | 2012-05-15 16:28:44 +0300 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2012-05-23 17:51:49 +0300 |
commit | f32d43763d35fe386bfa1e9f7997b7eb1014b20c (patch) | |
tree | a8eca37805ecfd0f47acb57203328ad88422a6d7 /source4 | |
parent | 1feb31246d00cdadf7624925a324f7f591c26b82 (diff) | |
download | samba-f32d43763d35fe386bfa1e9f7997b7eb1014b20c.tar.gz samba-f32d43763d35fe386bfa1e9f7997b7eb1014b20c.tar.bz2 samba-f32d43763d35fe386bfa1e9f7997b7eb1014b20c.zip |
dns: fix comments and make s4/libcli/resolve dns resolver working
After migrating to use libaddns, reply_to_addrs() needed to change the
way answers are iterated through. Originally libroken implementation
gave all answers as separate records with last one being explicitly NULL.
libaddns unmarshalling code gives all non-NULL answers and should be
iterated with explicit reply->num_answers in use.
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/resolve/dns_ex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c index 3b303d261f..7f5b84191a 100644 --- a/source4/libcli/resolve/dns_ex.c +++ b/source4/libcli/resolve/dns_ex.c @@ -98,7 +98,7 @@ static int reply_to_addrs(TALLOC_CTX *mem_ctx, uint32_t *a_num, } *cur_addrs = addrs; - for (i = 0; reply->answers[i]; i++) { + for (i = 0; i < reply->num_answers; i++) { rr = reply->answers[i]; /* we are only interested in the IN class */ |