Refactored dns_message_t for using attach/detach semantics

This commit will be used as a base for the next code updates in
order to have a better control of dns_message_t objects' lifetime.

(cherry picked from commit 12d6d13100)
This commit is contained in:
Diego Fronza
2020-09-21 16:16:15 -03:00
committed by Mark Andrews
parent d1bcb2fdbe
commit da84f8d1fd
25 changed files with 140 additions and 113 deletions

View File

@@ -79,7 +79,7 @@ check_response(isc_buffer_t *buf) {
assert_int_equal(message->rcode, dns_rcode_noerror);
dns_message_destroy(&message);
dns_message_detach(&message);
}
/* test ns_notify_start() */
@@ -126,7 +126,7 @@ notify_start(void **state) {
* handler.
*/
if (client->message != NULL) {
dns_message_destroy(&client->message);
dns_message_detach(&client->message);
}
client->message = nmsg;
nmsg = NULL;