nxt_controller.c (320:d385755599d6) nxt_controller.c (337:854a1a440616)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_main.h>

--- 104 unchanged lines hidden (view full) ---

113
114nxt_int_t
115nxt_controller_start(nxt_task_t *task, void *data)
116{
117 nxt_mp_t *mp;
118 nxt_str_t *json;
119 nxt_runtime_t *rt;
120 nxt_conf_value_t *conf;
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_main.h>

--- 104 unchanged lines hidden (view full) ---

113
114nxt_int_t
115nxt_controller_start(nxt_task_t *task, void *data)
116{
117 nxt_mp_t *mp;
118 nxt_str_t *json;
119 nxt_runtime_t *rt;
120 nxt_conf_value_t *conf;
121 nxt_event_engine_t *engine;
121 nxt_http_fields_hash_t *hash;
122
123 rt = task->thread->runtime;
124
122 nxt_http_fields_hash_t *hash;
123
124 rt = task->thread->runtime;
125
126 engine = task->thread->engine;
127
128 engine->mem_pool = nxt_mp_create(4096, 128, 1024, 64);
129 if (nxt_slow_path(engine->mem_pool == NULL)) {
130 return NXT_ERROR;
131 }
132
125 hash = nxt_http_fields_hash_create(nxt_controller_request_fields,
126 rt->mem_pool);
127 if (nxt_slow_path(hash == NULL)) {
128 return NXT_ERROR;
129 }
130
131 nxt_controller_fields_hash = hash;
132 nxt_queue_init(&nxt_controller_waiting_requests);

--- 548 unchanged lines hidden (view full) ---

681nxt_controller_conn_free(nxt_task_t *task, void *obj, void *data)
682{
683 nxt_conn_t *c;
684
685 c = obj;
686
687 nxt_debug(task, "controller conn free");
688
133 hash = nxt_http_fields_hash_create(nxt_controller_request_fields,
134 rt->mem_pool);
135 if (nxt_slow_path(hash == NULL)) {
136 return NXT_ERROR;
137 }
138
139 nxt_controller_fields_hash = hash;
140 nxt_queue_init(&nxt_controller_waiting_requests);

--- 548 unchanged lines hidden (view full) ---

689nxt_controller_conn_free(nxt_task_t *task, void *obj, void *data)
690{
691 nxt_conn_t *c;
692
693 c = obj;
694
695 nxt_debug(task, "controller conn free");
696
697 nxt_sockaddr_cache_free(task->thread->engine, c);
698
689 nxt_mp_destroy(c->mem_pool);
690
691 //nxt_free(c);
692}
693
694
695static nxt_int_t
696nxt_controller_request_content_length(void *ctx, nxt_http_field_t *field,

--- 531 unchanged lines hidden ---
699 nxt_mp_destroy(c->mem_pool);
700
701 //nxt_free(c);
702}
703
704
705static nxt_int_t
706nxt_controller_request_content_length(void *ctx, nxt_http_field_t *field,

--- 531 unchanged lines hidden ---