mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
clean up and start testing rendering
This commit is contained in:
parent
1d7987f422
commit
d070219e01
@ -1136,14 +1136,13 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
|
|||||||
next_name = ISC_LIST_NEXT(name, link);
|
next_name = ISC_LIST_NEXT(name, link);
|
||||||
|
|
||||||
result = dns_name_towire(name, &msg->cctx, &subbuffer);
|
result = dns_name_towire(name, &msg->cctx, &subbuffer);
|
||||||
if (result == DNS_R_NOSPACE) {
|
if (result != DNS_R_SUCCESS) {
|
||||||
subbuffer.used = used;
|
subbuffer.used = used;
|
||||||
msg->counts[sectionid] += total;
|
msg->counts[sectionid] += total;
|
||||||
isc_buffer_used(&subbuffer, &r);
|
isc_buffer_used(&subbuffer, &r);
|
||||||
isc_buffer_add(msg->buffer, r.length);
|
isc_buffer_add(msg->buffer, r.length);
|
||||||
return (DNS_R_NOSPACE);
|
|
||||||
} else if (result != DNS_R_SUCCESS)
|
|
||||||
return (result);
|
return (result);
|
||||||
|
}
|
||||||
|
|
||||||
rdataset = ISC_LIST_HEAD(name->list);
|
rdataset = ISC_LIST_HEAD(name->list);
|
||||||
while (rdataset != NULL) {
|
while (rdataset != NULL) {
|
||||||
@ -1158,14 +1157,13 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
|
|||||||
* If out of space, record stats on what we rendered
|
* If out of space, record stats on what we rendered
|
||||||
* so far, and return that status.
|
* so far, and return that status.
|
||||||
*/
|
*/
|
||||||
if (result == DNS_R_NOSPACE) {
|
if (result != DNS_R_SUCCESS) {
|
||||||
subbuffer.used = used;
|
subbuffer.used = used;
|
||||||
msg->counts[sectionid] += total;
|
msg->counts[sectionid] += total;
|
||||||
isc_buffer_used(&subbuffer, &r);
|
isc_buffer_used(&subbuffer, &r);
|
||||||
isc_buffer_add(msg->buffer, r.length);
|
isc_buffer_add(msg->buffer, r.length);
|
||||||
return (DNS_R_NOSPACE);
|
|
||||||
} else if (result != DNS_R_SUCCESS)
|
|
||||||
return (result);
|
return (result);
|
||||||
|
}
|
||||||
|
|
||||||
total += count;
|
total += count;
|
||||||
|
|
||||||
@ -1177,8 +1175,7 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
|
|||||||
name = next_name;
|
name = next_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX implement */
|
return (ISC_R_SUCCESS);
|
||||||
return (ISC_R_NOTIMPLEMENTED);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dns_result_t
|
dns_result_t
|
||||||
|
Loading…
x
Reference in New Issue
Block a user