Lines Matching refs:rtcf

122     nxt_router_conf_t *rtcf, nxt_conf_value_t *conf);
130 static nxt_int_t nxt_router_apps_hash_add(nxt_router_conf_t *rtcf,
132 static nxt_app_t *nxt_router_apps_hash_get(nxt_router_conf_t *rtcf,
134 static void nxt_router_apps_hash_use(nxt_task_t *task, nxt_router_conf_t *rtcf,
1069 nxt_router_conf_t *rtcf; in nxt_router_temp_conf() local
1077 rtcf = nxt_mp_zget(mp, sizeof(nxt_router_conf_t)); in nxt_router_temp_conf()
1078 if (nxt_slow_path(rtcf == NULL)) { in nxt_router_temp_conf()
1082 rtcf->mem_pool = mp; in nxt_router_temp_conf()
1084 rtcf->tstr_state = nxt_tstr_state_new(mp, 0); in nxt_router_temp_conf()
1085 if (nxt_slow_path(rtcf->tstr_state == NULL)) { in nxt_router_temp_conf()
1090 nxt_http_register_js_proto(rtcf->tstr_state->jcf); in nxt_router_temp_conf()
1104 tmcf->router_conf = rtcf; in nxt_router_temp_conf()
1139 if (rtcf->tstr_state != NULL) { in nxt_router_temp_conf()
1140 nxt_tstr_state_release(rtcf->tstr_state); in nxt_router_temp_conf()
1176 nxt_router_conf_t *rtcf; in nxt_router_conf_apply() local
1229 rtcf = tmcf->router_conf; in nxt_router_conf_apply()
1231 ret = nxt_tstr_state_done(rtcf->tstr_state, NULL); in nxt_router_conf_apply()
1245 if (rtcf->access_log != NULL && rtcf->access_log->fd == -1) { in nxt_router_conf_apply()
1254 router = rtcf->router; in nxt_router_conf_apply()
1268 nxt_router_apps_hash_use(task, rtcf, 1); in nxt_router_conf_apply()
1275 if (router->access_log != rtcf->access_log) { in nxt_router_conf_apply()
1276 nxt_router_access_log_use(&router->lock, rtcf->access_log); in nxt_router_conf_apply()
1280 router->access_log = rtcf->access_log; in nxt_router_conf_apply()
1310 nxt_router_conf_t *rtcf; in nxt_router_conf_ready() local
1321 rtcf = tmcf->router_conf; in nxt_router_conf_ready()
1323 lock = &rtcf->router->lock; in nxt_router_conf_ready()
1327 count = rtcf->count; in nxt_router_conf_ready()
1331 nxt_debug(task, "rtcf %p: %D", rtcf, count); in nxt_router_conf_ready()
1334 nxt_router_apps_hash_use(task, rtcf, -1); in nxt_router_conf_ready()
1336 nxt_router_access_log_release(task, lock, rtcf->access_log); in nxt_router_conf_ready()
1338 nxt_mp_destroy(rtcf->mem_pool); in nxt_router_conf_ready()
1353 nxt_router_conf_t *rtcf; in nxt_router_conf_error() local
1371 rtcf = tmcf->router_conf; in nxt_router_conf_error()
1379 router = rtcf->router; in nxt_router_conf_error()
1388 nxt_router_access_log_release(task, &router->lock, rtcf->access_log); in nxt_router_conf_error()
1390 nxt_mp_destroy(rtcf->mem_pool); in nxt_router_conf_error()
1627 nxt_router_conf_t *rtcf; in nxt_router_conf_create() local
1660 rtcf = tmcf->router_conf; in nxt_router_conf_create()
1661 mp = rtcf->mem_pool; in nxt_router_conf_create()
1664 nxt_nitems(nxt_router_conf), rtcf); in nxt_router_conf_create()
1670 if (rtcf->threads == 0) { in nxt_router_conf_create()
1671 rtcf->threads = nxt_ncpu; in nxt_router_conf_create()
1676 ret = nxt_router_conf_process_static(task, rtcf, conf); in nxt_router_conf_create()
1681 router = rtcf->router; in nxt_router_conf_create()
1732 ret = nxt_router_apps_hash_add(rtcf, prev); in nxt_router_conf_create()
1867 ret = nxt_router_apps_hash_add(rtcf, app); in nxt_router_conf_create()
1925 rtcf->routes = routes; in nxt_router_conf_create()
2088 skcf->router_conf = rtcf; in nxt_router_conf_create()
2096 skcf->action = nxt_http_pass_application(task, rtcf, in nxt_router_conf_create()
2114 ret = nxt_router_access_log_create(task, rtcf, value); in nxt_router_conf_create()
2207 nxt_router_conf_t *rtcf; in nxt_router_js_module_rpc_handler() local
2220 rtcf = tmcf->router_conf; in nxt_router_js_module_rpc_handler()
2231 ret = nxt_js_add_module(rtcf->tstr_state->jcf, &js_module->name, &text); in nxt_router_js_module_rpc_handler()
2273 nxt_router_conf_process_static(nxt_task_t *task, nxt_router_conf_t *rtcf, in nxt_router_conf_process_static() argument
2285 mp = rtcf->mem_pool; in nxt_router_conf_process_static()
2287 ret = nxt_http_static_mtypes_init(mp, &rtcf->mtypes_hash); in nxt_router_conf_process_static()
2320 ret = nxt_http_static_mtypes_hash_add(mp, &rtcf->mtypes_hash, in nxt_router_conf_process_static()
2340 ret = nxt_http_static_mtypes_hash_add(mp, &rtcf->mtypes_hash, in nxt_router_conf_process_static()
2568 nxt_router_apps_hash_add(nxt_router_conf_t *rtcf, nxt_app_t *app) in nxt_router_apps_hash_add() argument
2577 lhq.pool = rtcf->mem_pool; in nxt_router_apps_hash_add()
2579 switch (nxt_lvlhsh_insert(&rtcf->apps_hash, &lhq)) { in nxt_router_apps_hash_add()
2595 nxt_router_apps_hash_get(nxt_router_conf_t *rtcf, nxt_str_t *name) in nxt_router_apps_hash_get() argument
2603 if (nxt_lvlhsh_find(&rtcf->apps_hash, &lhq) != NXT_OK) { in nxt_router_apps_hash_get()
2612 nxt_router_apps_hash_use(nxt_task_t *task, nxt_router_conf_t *rtcf, int i) in nxt_router_apps_hash_use() argument
2620 app = nxt_lvlhsh_each(&rtcf->apps_hash, &lhe); in nxt_router_apps_hash_use()
2638 nxt_router_application_init(nxt_router_conf_t *rtcf, nxt_str_t *name, in nxt_router_application_init() argument
2646 app = nxt_router_apps_hash_get(rtcf, name); in nxt_router_application_init()
2651 conf = nxt_mp_get(rtcf->mem_pool, sizeof(nxt_http_app_conf_t)); in nxt_router_application_init()
3945 nxt_router_conf_t *rtcf; in nxt_router_conf_release() local
3962 rtcf = skcf->router_conf; in nxt_router_conf_release()
3963 lock = &rtcf->router->lock; in nxt_router_conf_release()
3968 rtcf, rtcf->count); in nxt_router_conf_release()
3972 rtcf = NULL; in nxt_router_conf_release()
3977 if (--rtcf->count != 0) { in nxt_router_conf_release()
3978 rtcf = NULL; in nxt_router_conf_release()
3992 if (rtcf != NULL) { in nxt_router_conf_release()
3995 nxt_router_apps_hash_use(task, rtcf, -1); in nxt_router_conf_release()
3997 nxt_router_access_log_release(task, lock, rtcf->access_log); in nxt_router_conf_release()
3999 nxt_tstr_state_release(rtcf->tstr_state); in nxt_router_conf_release()
4001 nxt_mp_thread_adopt(rtcf->mem_pool); in nxt_router_conf_release()
4003 nxt_mp_destroy(rtcf->mem_pool); in nxt_router_conf_release()