mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
s/dns_dispatch_destroy()/dns_dispatch_detach()/g
This commit is contained in:
@@ -60,6 +60,7 @@ unsigned char render_buffer[1024];
|
|||||||
dns_rdataset_t rdataset;
|
dns_rdataset_t rdataset;
|
||||||
dns_rdatalist_t rdatalist;
|
dns_rdatalist_t rdatalist;
|
||||||
|
|
||||||
|
void my_accept(isc_task_t *, isc_event_t *);
|
||||||
void got_request(isc_task_t *, isc_event_t *);
|
void got_request(isc_task_t *, isc_event_t *);
|
||||||
void got_response(isc_task_t *, isc_event_t *);
|
void got_response(isc_task_t *, isc_event_t *);
|
||||||
void start_response(void);
|
void start_response(void);
|
||||||
@@ -293,7 +294,7 @@ got_request(isc_task_t *task, isc_event_t *ev_in)
|
|||||||
if (ev->result != DNS_R_SUCCESS) {
|
if (ev->result != DNS_R_SUCCESS) {
|
||||||
printf("Got error, terminating application\n");
|
printf("Got error, terminating application\n");
|
||||||
dns_dispatch_removerequest(disp, &resp, &ev);
|
dns_dispatch_removerequest(disp, &resp, &ev);
|
||||||
dns_dispatch_destroy(&disp);
|
dns_dispatch_detach(&disp);
|
||||||
isc_app_shutdown();
|
isc_app_shutdown();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -320,7 +321,7 @@ got_request(isc_task_t *task, isc_event_t *ev_in)
|
|||||||
case 6:
|
case 6:
|
||||||
printf("--- removing request\n");
|
printf("--- removing request\n");
|
||||||
dns_dispatch_removerequest(disp, &resp, &ev);
|
dns_dispatch_removerequest(disp, &resp, &ev);
|
||||||
dns_dispatch_destroy(&disp);
|
dns_dispatch_detach(&disp);
|
||||||
isc_app_shutdown();
|
isc_app_shutdown();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -373,7 +373,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
isc_socket_detach(&s0);
|
isc_socket_detach(&s0);
|
||||||
|
|
||||||
dns_dispatch_destroy(&disp);
|
dns_dispatch_detach(&disp);
|
||||||
|
|
||||||
fprintf(stderr, "Destroying socket manager\n");
|
fprintf(stderr, "Destroying socket manager\n");
|
||||||
isc_socketmgr_destroy(&socketmgr);
|
isc_socketmgr_destroy(&socketmgr);
|
||||||
|
@@ -942,7 +942,19 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dns_dispatch_destroy(dns_dispatch_t **dispp)
|
dns_dispatch_attach(dns_dispatch_t *disp, dns_dispatch_t **dispp)
|
||||||
|
{
|
||||||
|
REQUIRE(VALID_DISPATCH(disp));
|
||||||
|
REQUIRE(dispp != NULL && *dispp == NULL);
|
||||||
|
|
||||||
|
disp->refcount++;
|
||||||
|
|
||||||
|
*dispp = disp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_dispatch_detach(dns_dispatch_t **dispp)
|
||||||
{
|
{
|
||||||
dns_dispatch_t *disp;
|
dns_dispatch_t *disp;
|
||||||
isc_boolean_t killit;
|
isc_boolean_t killit;
|
||||||
|
@@ -109,10 +109,24 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
dns_dispatch_destroy(dns_dispatch_t **dispp);
|
dns_dispatch_attach(dns_dispatch_t *disp, dns_dispatch_t **dispp);
|
||||||
/*
|
/*
|
||||||
* Destroys dispatch. All buffers and other bits must be returned to the
|
* Attach to a dispatch handle.
|
||||||
* dispatch before this is called.
|
*
|
||||||
|
* Requires:
|
||||||
|
* < mumble >
|
||||||
|
*
|
||||||
|
* Ensures:
|
||||||
|
* < mumble >
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* < mumble >
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
dns_dispatch_detach(dns_dispatch_t **dispp);
|
||||||
|
/*
|
||||||
|
* Detaches from the dispatch.
|
||||||
*
|
*
|
||||||
* Requires:
|
* Requires:
|
||||||
* < mumble >
|
* < mumble >
|
||||||
@@ -233,36 +247,6 @@ dns_dispatch_freeevent(dns_dispatch_t *disp, dns_dispentry_t *resp,
|
|||||||
* < mumble >
|
* < mumble >
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
|
||||||
dns_dispatch_attach(dns_dispatch_t *disp, dns_dispatch_t **dispp);
|
|
||||||
/*
|
|
||||||
* Attach to a dispatch handle.
|
|
||||||
*
|
|
||||||
* Requires:
|
|
||||||
* < mumble >
|
|
||||||
*
|
|
||||||
* Ensures:
|
|
||||||
* < mumble >
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* < mumble >
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
dns_dispatch_detach(dns_dispatch_t **dispp);
|
|
||||||
/*
|
|
||||||
* Detach from a dispatch handle.
|
|
||||||
*
|
|
||||||
* Requires:
|
|
||||||
* < mumble >
|
|
||||||
*
|
|
||||||
* Ensures:
|
|
||||||
* < mumble >
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* < mumble >
|
|
||||||
*/
|
|
||||||
|
|
||||||
isc_socket_t *
|
isc_socket_t *
|
||||||
dns_dispatch_getsocket(dns_dispatch_t *disp);
|
dns_dispatch_getsocket(dns_dispatch_t *disp);
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user