Attaching and detaching handle pointers will make it easier to
determine where and why reference counting errors have occurred.
A handle needs to be referenced more than once when multiple
asynchronous operations are in flight, so callers must now maintain
multiple handle pointers for each pending operation. For example,
ns_client objects now contain:
- reqhandle: held while waiting for a request callback (query,
notify, update)
- sendhandle: held while waiting for a send callback
- fetchhandle: held while waiting for a recursive fetch to
complete
- updatehandle: held while waiting for an update-forwarding
task to complete
control channel connection objects now contain:
- readhandle: held while waiting for a read callback
- sendhandle: held while waiting for a send callback
- cmdhandle: held while an rndc command is running
httpd connections contain:
- readhandle: held while waiting for a read callback
- sendhandle: held while waiting for a send callback
41 lines
945 B
C
41 lines
945 B
C
/*
|
|
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* See the COPYRIGHT file distributed with this work for additional
|
|
* information regarding copyright ownership.
|
|
*/
|
|
|
|
/*! \file */
|
|
|
|
#include <inttypes.h>
|
|
#include <stdbool.h>
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
#include <unistd.h>
|
|
|
|
#include <isc/mem.h>
|
|
#include <isc/netmgr.h>
|
|
#include <isc/util.h>
|
|
|
|
#include <dns/view.h>
|
|
|
|
#include <ns/client.h>
|
|
|
|
/*
|
|
* This overrides calls to isc_nmhandle_unref(), sending them to
|
|
* __wrap_isc_nmhandle_unref(), when libtool is in use and LD_WRAP
|
|
* can't be used.
|
|
*/
|
|
|
|
extern void
|
|
__wrap_isc_nmhandle_detach(isc_nmhandle_t **handlep);
|
|
|
|
void
|
|
__wrap_isc_nmhandle_detach(isc_nmhandle_t **handlep) {
|
|
__wrap_isc_nmhandle_detach(handlep);
|
|
}
|