Lines Matching refs:rtcf

105     nxt_router_conf_t *rtcf, nxt_conf_value_t *conf);
113 static nxt_int_t nxt_router_apps_hash_add(nxt_router_conf_t *rtcf,
115 static nxt_app_t *nxt_router_apps_hash_get(nxt_router_conf_t *rtcf,
117 static void nxt_router_apps_hash_use(nxt_task_t *task, nxt_router_conf_t *rtcf,
966 nxt_router_conf_t *rtcf; in nxt_router_temp_conf() local
974 rtcf = nxt_mp_zget(mp, sizeof(nxt_router_conf_t)); in nxt_router_temp_conf()
975 if (nxt_slow_path(rtcf == NULL)) { in nxt_router_temp_conf()
979 rtcf->mem_pool = mp; in nxt_router_temp_conf()
981 rtcf->var_fields = nxt_array_create(mp, 4, sizeof(nxt_var_field_t)); in nxt_router_temp_conf()
982 if (nxt_slow_path(rtcf->var_fields == NULL)) { in nxt_router_temp_conf()
997 tmcf->router_conf = rtcf; in nxt_router_temp_conf()
1061 nxt_router_conf_t *rtcf; in nxt_router_conf_apply() local
1106 rtcf = tmcf->router_conf; in nxt_router_conf_apply()
1108 if (rtcf->access_log != NULL && rtcf->access_log->fd == -1) { in nxt_router_conf_apply()
1117 router = rtcf->router; in nxt_router_conf_apply()
1131 nxt_router_apps_hash_use(task, rtcf, 1); in nxt_router_conf_apply()
1138 if (router->access_log != rtcf->access_log) { in nxt_router_conf_apply()
1139 nxt_router_access_log_use(&router->lock, rtcf->access_log); in nxt_router_conf_apply()
1143 router->access_log = rtcf->access_log; in nxt_router_conf_apply()
1173 nxt_router_conf_t *rtcf; in nxt_router_conf_ready() local
1184 rtcf = tmcf->router_conf; in nxt_router_conf_ready()
1186 lock = &rtcf->router->lock; in nxt_router_conf_ready()
1190 count = rtcf->count; in nxt_router_conf_ready()
1194 nxt_debug(task, "rtcf %p: %D", rtcf, count); in nxt_router_conf_ready()
1197 nxt_router_apps_hash_use(task, rtcf, -1); in nxt_router_conf_ready()
1199 nxt_router_access_log_release(task, lock, rtcf->access_log); in nxt_router_conf_ready()
1201 nxt_mp_destroy(rtcf->mem_pool); in nxt_router_conf_ready()
1216 nxt_router_conf_t *rtcf; in nxt_router_conf_error() local
1234 rtcf = tmcf->router_conf; in nxt_router_conf_error()
1242 router = rtcf->router; in nxt_router_conf_error()
1251 nxt_router_access_log_release(task, &router->lock, rtcf->access_log); in nxt_router_conf_error()
1253 nxt_mp_destroy(rtcf->mem_pool); in nxt_router_conf_error()
1475 nxt_router_conf_t *rtcf; in nxt_router_conf_create() local
1505 rtcf = tmcf->router_conf; in nxt_router_conf_create()
1506 mp = rtcf->mem_pool; in nxt_router_conf_create()
1509 nxt_nitems(nxt_router_conf), rtcf); in nxt_router_conf_create()
1515 if (rtcf->threads == 0) { in nxt_router_conf_create()
1516 rtcf->threads = nxt_ncpu; in nxt_router_conf_create()
1521 ret = nxt_router_conf_process_static(task, rtcf, conf); in nxt_router_conf_create()
1526 router = rtcf->router; in nxt_router_conf_create()
1577 ret = nxt_router_apps_hash_add(rtcf, prev); in nxt_router_conf_create()
1712 ret = nxt_router_apps_hash_add(rtcf, app); in nxt_router_conf_create()
1770 rtcf->routes = routes; in nxt_router_conf_create()
1931 skcf->router_conf = rtcf; in nxt_router_conf_create()
1939 skcf->action = nxt_http_pass_application(task, rtcf, in nxt_router_conf_create()
1957 ret = nxt_router_access_log_create(task, rtcf, value); in nxt_router_conf_create()
2015 nxt_router_conf_process_static(nxt_task_t *task, nxt_router_conf_t *rtcf, in nxt_router_conf_process_static() argument
2027 mp = rtcf->mem_pool; in nxt_router_conf_process_static()
2029 ret = nxt_http_static_mtypes_init(mp, &rtcf->mtypes_hash); in nxt_router_conf_process_static()
2062 ret = nxt_http_static_mtypes_hash_add(mp, &rtcf->mtypes_hash, in nxt_router_conf_process_static()
2082 ret = nxt_http_static_mtypes_hash_add(mp, &rtcf->mtypes_hash, in nxt_router_conf_process_static()
2310 nxt_router_apps_hash_add(nxt_router_conf_t *rtcf, nxt_app_t *app) in nxt_router_apps_hash_add() argument
2319 lhq.pool = rtcf->mem_pool; in nxt_router_apps_hash_add()
2321 switch (nxt_lvlhsh_insert(&rtcf->apps_hash, &lhq)) { in nxt_router_apps_hash_add()
2337 nxt_router_apps_hash_get(nxt_router_conf_t *rtcf, nxt_str_t *name) in nxt_router_apps_hash_get() argument
2345 if (nxt_lvlhsh_find(&rtcf->apps_hash, &lhq) != NXT_OK) { in nxt_router_apps_hash_get()
2354 nxt_router_apps_hash_use(nxt_task_t *task, nxt_router_conf_t *rtcf, int i) in nxt_router_apps_hash_use() argument
2362 app = nxt_lvlhsh_each(&rtcf->apps_hash, &lhe); in nxt_router_apps_hash_use()
2380 nxt_router_application_init(nxt_router_conf_t *rtcf, nxt_str_t *name, in nxt_router_application_init() argument
2388 app = nxt_router_apps_hash_get(rtcf, name); in nxt_router_application_init()
2393 conf = nxt_mp_get(rtcf->mem_pool, sizeof(nxt_http_app_conf_t)); in nxt_router_application_init()
3652 nxt_router_conf_t *rtcf; in nxt_router_conf_release() local
3669 rtcf = skcf->router_conf; in nxt_router_conf_release()
3670 lock = &rtcf->router->lock; in nxt_router_conf_release()
3675 rtcf, rtcf->count); in nxt_router_conf_release()
3679 rtcf = NULL; in nxt_router_conf_release()
3684 if (--rtcf->count != 0) { in nxt_router_conf_release()
3685 rtcf = NULL; in nxt_router_conf_release()
3699 if (rtcf != NULL) { in nxt_router_conf_release()
3702 nxt_router_apps_hash_use(task, rtcf, -1); in nxt_router_conf_release()
3704 nxt_router_access_log_release(task, lock, rtcf->access_log); in nxt_router_conf_release()
3706 nxt_mp_thread_adopt(rtcf->mem_pool); in nxt_router_conf_release()
3708 nxt_mp_destroy(rtcf->mem_pool); in nxt_router_conf_release()