Style fixes.
This commit is contained in:
@@ -103,11 +103,9 @@ static nxt_int_t nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt,
|
|||||||
static nxt_int_t nxt_conf_vldt_java_option(nxt_conf_validation_t *vldt,
|
static nxt_int_t nxt_conf_vldt_java_option(nxt_conf_validation_t *vldt,
|
||||||
nxt_conf_value_t *value);
|
nxt_conf_value_t *value);
|
||||||
|
|
||||||
static nxt_int_t
|
static nxt_int_t nxt_conf_vldt_isolation(nxt_conf_validation_t *vldt,
|
||||||
nxt_conf_vldt_isolation(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
|
nxt_conf_value_t *value, void *data);
|
||||||
void *data);
|
static nxt_int_t nxt_conf_vldt_clone_namespaces(nxt_conf_validation_t *vldt,
|
||||||
static nxt_int_t
|
|
||||||
nxt_conf_vldt_clone_namespaces(nxt_conf_validation_t *vldt,
|
|
||||||
nxt_conf_value_t *value, void *data);
|
nxt_conf_value_t *value, void *data);
|
||||||
|
|
||||||
#if (NXT_HAVE_CLONE_NEWUSER)
|
#if (NXT_HAVE_CLONE_NEWUSER)
|
||||||
@@ -620,7 +618,7 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_java_members[] = {
|
|||||||
{ nxt_string("classpath"),
|
{ nxt_string("classpath"),
|
||||||
NXT_CONF_VLDT_ARRAY,
|
NXT_CONF_VLDT_ARRAY,
|
||||||
&nxt_conf_vldt_array_iterator,
|
&nxt_conf_vldt_array_iterator,
|
||||||
(void *) &nxt_conf_vldt_java_classpath},
|
(void *) &nxt_conf_vldt_java_classpath },
|
||||||
|
|
||||||
{ nxt_string("webapp"),
|
{ nxt_string("webapp"),
|
||||||
NXT_CONF_VLDT_STRING,
|
NXT_CONF_VLDT_STRING,
|
||||||
@@ -630,7 +628,7 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_java_members[] = {
|
|||||||
{ nxt_string("options"),
|
{ nxt_string("options"),
|
||||||
NXT_CONF_VLDT_ARRAY,
|
NXT_CONF_VLDT_ARRAY,
|
||||||
&nxt_conf_vldt_array_iterator,
|
&nxt_conf_vldt_array_iterator,
|
||||||
(void *) &nxt_conf_vldt_java_option},
|
(void *) &nxt_conf_vldt_java_option },
|
||||||
|
|
||||||
{ nxt_string("unit_jars"),
|
{ nxt_string("unit_jars"),
|
||||||
NXT_CONF_VLDT_STRING,
|
NXT_CONF_VLDT_STRING,
|
||||||
@@ -1556,8 +1554,8 @@ nxt_conf_vldt_environment(nxt_conf_validation_t *vldt, nxt_str_t *name,
|
|||||||
|
|
||||||
|
|
||||||
static nxt_int_t
|
static nxt_int_t
|
||||||
nxt_conf_vldt_clone_namespaces(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
|
nxt_conf_vldt_clone_namespaces(nxt_conf_validation_t *vldt,
|
||||||
void *data)
|
nxt_conf_value_t *value, void *data)
|
||||||
{
|
{
|
||||||
return nxt_conf_vldt_object(vldt, value, data);
|
return nxt_conf_vldt_object(vldt, value, data);
|
||||||
}
|
}
|
||||||
@@ -1722,7 +1720,8 @@ nxt_conf_vldt_php_option(nxt_conf_validation_t *vldt, nxt_str_t *name,
|
|||||||
|
|
||||||
|
|
||||||
static nxt_int_t
|
static nxt_int_t
|
||||||
nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt, nxt_conf_value_t *value)
|
nxt_conf_vldt_java_classpath(nxt_conf_validation_t *vldt,
|
||||||
|
nxt_conf_value_t *value)
|
||||||
{
|
{
|
||||||
nxt_str_t str;
|
nxt_str_t str;
|
||||||
|
|
||||||
|
|||||||
@@ -599,13 +599,15 @@ nxt_h1p_header_process(nxt_task_t *task, nxt_h1proto_t *h1p,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (nxt_slow_path(h1p->websocket_key == NULL)) {
|
if (nxt_slow_path(h1p->websocket_key == NULL)) {
|
||||||
nxt_log(task, NXT_LOG_INFO, "h1p upgrade: bad or absent websocket key");
|
nxt_log(task, NXT_LOG_INFO,
|
||||||
|
"h1p upgrade: bad or absent websocket key");
|
||||||
|
|
||||||
return NXT_HTTP_BAD_REQUEST;
|
return NXT_HTTP_BAD_REQUEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nxt_slow_path(h1p->websocket_version_ok == 0)) {
|
if (nxt_slow_path(h1p->websocket_version_ok == 0)) {
|
||||||
nxt_log(task, NXT_LOG_INFO, "h1p upgrade: bad or absent websocket version");
|
nxt_log(task, NXT_LOG_INFO,
|
||||||
|
"h1p upgrade: bad or absent websocket version");
|
||||||
|
|
||||||
return NXT_HTTP_UPGRADE_REQUIRED;
|
return NXT_HTTP_UPGRADE_REQUIRED;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ static void nxt_main_port_access_log_handler(nxt_task_t *task,
|
|||||||
|
|
||||||
static nxt_int_t nxt_init_set_isolation(nxt_task_t *task,
|
static nxt_int_t nxt_init_set_isolation(nxt_task_t *task,
|
||||||
nxt_process_init_t *init, nxt_conf_value_t *isolation);
|
nxt_process_init_t *init, nxt_conf_value_t *isolation);
|
||||||
static nxt_int_t nxt_init_set_ns(nxt_task_t *task,
|
static nxt_int_t nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init,
|
||||||
nxt_process_init_t *init, nxt_conf_value_t *ns);
|
nxt_conf_value_t *ns);
|
||||||
|
|
||||||
const nxt_sig_event_t nxt_main_process_signals[] = {
|
const nxt_sig_event_t nxt_main_process_signals[] = {
|
||||||
nxt_event_signal(SIGHUP, nxt_main_process_signal_handler),
|
nxt_event_signal(SIGHUP, nxt_main_process_signal_handler),
|
||||||
@@ -1540,7 +1540,8 @@ nxt_init_set_isolation(nxt_task_t *task, nxt_process_init_t *init,
|
|||||||
|
|
||||||
|
|
||||||
static nxt_int_t
|
static nxt_int_t
|
||||||
nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init, nxt_conf_value_t *namespaces)
|
nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init,
|
||||||
|
nxt_conf_value_t *namespaces)
|
||||||
{
|
{
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
nxt_str_t name;
|
nxt_str_t name;
|
||||||
@@ -1549,7 +1550,13 @@ nxt_init_set_ns(nxt_task_t *task, nxt_process_init_t *init, nxt_conf_value_t *na
|
|||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
while ((value = nxt_conf_next_object_member(namespaces, &name, &index)) != NULL) {
|
for ( ;; ) {
|
||||||
|
value = nxt_conf_next_object_member(namespaces, &name, &index);
|
||||||
|
|
||||||
|
if (value == NULL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
flag = 0;
|
flag = 0;
|
||||||
|
|
||||||
#if (NXT_HAVE_CLONE_NEWUSER)
|
#if (NXT_HAVE_CLONE_NEWUSER)
|
||||||
|
|||||||
@@ -1458,7 +1458,8 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
|
|||||||
next = 0;
|
next = 0;
|
||||||
|
|
||||||
for ( ;; ) {
|
for ( ;; ) {
|
||||||
application = nxt_conf_next_object_member(applications, &name, &next);
|
application = nxt_conf_next_object_member(applications,
|
||||||
|
&name, &next);
|
||||||
if (application == NULL) {
|
if (application == NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1458,7 +1458,8 @@ nxt_unit_response_realloc(nxt_unit_request_info_t *req,
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
resp->piggyback_content_length = req->response->piggyback_content_length;
|
resp->piggyback_content_length =
|
||||||
|
req->response->piggyback_content_length;
|
||||||
|
|
||||||
nxt_unit_sptr_set(&resp->piggyback_content, p);
|
nxt_unit_sptr_set(&resp->piggyback_content, p);
|
||||||
p = nxt_cpymem(p, nxt_unit_sptr_get(&req->response->piggyback_content),
|
p = nxt_cpymem(p, nxt_unit_sptr_get(&req->response->piggyback_content),
|
||||||
@@ -1953,7 +1954,8 @@ nxt_unit_mmap_buf_send(nxt_unit_ctx_t *ctx, uint32_t stream,
|
|||||||
|
|
||||||
if (hdr != NULL) {
|
if (hdr != NULL) {
|
||||||
m.mmap_msg.mmap_id = hdr->id;
|
m.mmap_msg.mmap_id = hdr->id;
|
||||||
m.mmap_msg.chunk_id = nxt_port_mmap_chunk_id(hdr, (u_char *) buf->start);
|
m.mmap_msg.chunk_id = nxt_port_mmap_chunk_id(hdr,
|
||||||
|
(u_char *) buf->start);
|
||||||
}
|
}
|
||||||
|
|
||||||
nxt_unit_debug(ctx, "#%"PRIu32": send mmap: (%d,%d,%d)",
|
nxt_unit_debug(ctx, "#%"PRIu32": send mmap: (%d,%d,%d)",
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ nxt_ruby_stream_io_input_init(void)
|
|||||||
rb_gc_register_address(&stream_io);
|
rb_gc_register_address(&stream_io);
|
||||||
|
|
||||||
rb_define_singleton_method(stream_io, "new", nxt_ruby_stream_io_new, 1);
|
rb_define_singleton_method(stream_io, "new", nxt_ruby_stream_io_new, 1);
|
||||||
rb_define_method(stream_io, "initialize", nxt_ruby_stream_io_initialize, -1);
|
rb_define_method(stream_io, "initialize",
|
||||||
|
nxt_ruby_stream_io_initialize, -1);
|
||||||
rb_define_method(stream_io, "gets", nxt_ruby_stream_io_gets, 0);
|
rb_define_method(stream_io, "gets", nxt_ruby_stream_io_gets, 0);
|
||||||
rb_define_method(stream_io, "each", nxt_ruby_stream_io_each, 0);
|
rb_define_method(stream_io, "each", nxt_ruby_stream_io_each, 0);
|
||||||
rb_define_method(stream_io, "read", nxt_ruby_stream_io_read, -2);
|
rb_define_method(stream_io, "read", nxt_ruby_stream_io_read, -2);
|
||||||
@@ -51,7 +52,8 @@ nxt_ruby_stream_io_error_init(void)
|
|||||||
rb_gc_register_address(&stream_io);
|
rb_gc_register_address(&stream_io);
|
||||||
|
|
||||||
rb_define_singleton_method(stream_io, "new", nxt_ruby_stream_io_new, 1);
|
rb_define_singleton_method(stream_io, "new", nxt_ruby_stream_io_new, 1);
|
||||||
rb_define_method(stream_io, "initialize", nxt_ruby_stream_io_initialize, -1);
|
rb_define_method(stream_io, "initialize",
|
||||||
|
nxt_ruby_stream_io_initialize, -1);
|
||||||
rb_define_method(stream_io, "puts", nxt_ruby_stream_io_puts, -2);
|
rb_define_method(stream_io, "puts", nxt_ruby_stream_io_puts, -2);
|
||||||
rb_define_method(stream_io, "write", nxt_ruby_stream_io_write, -2);
|
rb_define_method(stream_io, "write", nxt_ruby_stream_io_write, -2);
|
||||||
rb_define_method(stream_io, "flush", nxt_ruby_stream_io_flush, 0);
|
rb_define_method(stream_io, "flush", nxt_ruby_stream_io_flush, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user