Lines Matching refs:env
263 if(!(daemon->env = (struct module_env*)calloc(1, in daemon_init()
264 sizeof(*daemon->env)))) { in daemon_init()
268 daemon->env->modstack = &daemon->mods; in daemon_init()
270 if(!edns_known_options_init(daemon->env)) { in daemon_init()
271 free(daemon->env); in daemon_init()
278 edns_known_options_delete(daemon->env); in daemon_init()
279 free(daemon->env); in daemon_init()
286 edns_known_options_delete(daemon->env); in daemon_init()
287 free(daemon->env); in daemon_init()
295 edns_known_options_delete(daemon->env); in daemon_init()
296 free(daemon->env); in daemon_init()
304 if((daemon->env->auth_zones = auth_zones_create()) == 0) { in daemon_init()
308 edns_known_options_delete(daemon->env); in daemon_init()
309 free(daemon->env); in daemon_init()
313 if(!(daemon->env->edns_strings = edns_strings_create())) { in daemon_init()
314 auth_zones_delete(daemon->env->auth_zones); in daemon_init()
318 edns_known_options_delete(daemon->env); in daemon_init()
319 free(daemon->env); in daemon_init()
450 daemon->env->cfg = daemon->cfg; in daemon_privileged()
451 daemon->env->alloc = &daemon->superalloc; in daemon_privileged()
452 daemon->env->worker = NULL; in daemon_privileged()
454 daemon->env)) { in daemon_privileged()
466 daemon->env->cfg = daemon->cfg; in daemon_setup_modules()
467 daemon->env->alloc = &daemon->superalloc; in daemon_setup_modules()
468 daemon->env->worker = NULL; in daemon_setup_modules()
470 modstack_call_deinit(&daemon->mods, daemon->env); in daemon_setup_modules()
472 daemon->env->need_to_validate = 0; /* set by module init below */ in daemon_setup_modules()
474 daemon->env)) { in daemon_setup_modules()
478 log_edns_known_options(VERB_ALGO, daemon->env); in daemon_setup_modules()
757 if(!(daemon->env->fwds = forwards_create()) || in daemon_fork()
758 !forwards_apply_cfg(daemon->env->fwds, daemon->cfg)) in daemon_fork()
760 if(!(daemon->env->hints = hints_create()) || in daemon_fork()
761 !hints_apply_cfg(daemon->env->hints, daemon->cfg)) in daemon_fork()
779 if(!auth_zones_apply_cfg(daemon->env->auth_zones, daemon->cfg, 1, in daemon_fork()
780 &daemon->use_rpz, daemon->env, &daemon->mods)) in daemon_fork()
784 if(!edns_strings_apply_cfg(daemon->env->edns_strings, daemon->cfg)) in daemon_fork()
788 daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods, in daemon_fork()
789 daemon->env); in daemon_fork()
879 slabhash_clear(&daemon->env->rrset_cache->table); in daemon_cleanup()
880 slabhash_clear(daemon->env->msg_cache); in daemon_cleanup()
883 forwards_delete(daemon->env->fwds); in daemon_cleanup()
884 daemon->env->fwds = NULL; in daemon_cleanup()
885 hints_delete(daemon->env->hints); in daemon_cleanup()
886 daemon->env->hints = NULL; in daemon_cleanup()
893 if(daemon->env->auth_zones) in daemon_cleanup()
894 auth_zones_cleanup(daemon->env->auth_zones); in daemon_cleanup()
929 modstack_call_deinit(&daemon->mods, daemon->env); in daemon_delete()
930 modstack_call_destartup(&daemon->mods, daemon->env); in daemon_delete()
937 if(daemon->env) { in daemon_delete()
938 slabhash_delete(daemon->env->msg_cache); in daemon_delete()
939 rrset_cache_delete(daemon->env->rrset_cache); in daemon_delete()
940 infra_delete(daemon->env->infra_cache); in daemon_delete()
941 edns_known_options_delete(daemon->env); in daemon_delete()
942 edns_strings_delete(daemon->env->edns_strings); in daemon_delete()
943 auth_zones_delete(daemon->env->auth_zones); in daemon_delete()
954 free(daemon->env); in daemon_delete()
1036 !slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size, in daemon_apply_cfg()
1038 !slabhash_is_size(&daemon->env->rrset_cache->table, in daemon_apply_cfg()
1042 slabhash_clear(&daemon->env->rrset_cache->table); in daemon_apply_cfg()
1043 slabhash_clear(daemon->env->msg_cache); in daemon_apply_cfg()
1047 if(!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size, in daemon_apply_cfg()
1049 slabhash_delete(daemon->env->msg_cache); in daemon_apply_cfg()
1050 daemon->env->msg_cache = slabhash_create(cfg->msg_cache_slabs, in daemon_apply_cfg()
1054 if(!daemon->env->msg_cache) { in daemon_apply_cfg()
1058 if((daemon->env->rrset_cache = rrset_cache_adjust( in daemon_apply_cfg()
1059 daemon->env->rrset_cache, cfg, &daemon->superalloc)) == 0) in daemon_apply_cfg()
1061 if((daemon->env->infra_cache = infra_adjust(daemon->env->infra_cache, in daemon_apply_cfg()