improve hook processing macros
- use a get_hooktab() function to determine the hook table. - PROCESS_HOOK now jumps to a cleanup tag on failure - add PROCESS_ALL_HOOKS in query.c, to run all hook functions at a specified hook point without stopping. this is to be used for intiialization and destruction functions that must run in every module. - 'result' is set in PROCESS_HOOK only when a hook function interrupts processing. - revised terminology: a "callback" is now a "hook action" - remove unused NS_PROCESS_HOOK and NS_PROCESS_HOOK_VOID macros.
This commit is contained in:
@@ -85,7 +85,7 @@ run_sfcache_test(const ns__query_sfcache_test_params_t *test) {
|
||||
query_ctx_t *qctx = NULL;
|
||||
isc_result_t result;
|
||||
ns_hook_t hook = {
|
||||
.callback = ns_test_hook_catch_call,
|
||||
.action = ns_test_hook_catch_call,
|
||||
};
|
||||
|
||||
REQUIRE(test != NULL);
|
||||
@@ -282,7 +282,7 @@ run_start_test(const ns__query_start_test_params_t *test) {
|
||||
query_ctx_t *qctx = NULL;
|
||||
isc_result_t result;
|
||||
ns_hook_t hook = {
|
||||
.callback = ns_test_hook_catch_call,
|
||||
.action = ns_test_hook_catch_call,
|
||||
};
|
||||
|
||||
REQUIRE(test != NULL);
|
||||
|
||||
Reference in New Issue
Block a user