/unit/src/test/ |
H A D | nxt_unit_websocket_chat.c | 51 int rc = NXT_UNIT_OK; in ws_chat_request_handler() local 60 rc = ws_chat_root(req); in ws_chat_request_handler() 96 nxt_unit_request_done(req, rc); in ws_chat_request_handler() 103 int rc; in ws_chat_root() local 112 if (nxt_slow_path(rc != NXT_UNIT_OK)) { in ws_chat_root() 113 return rc; in ws_chat_root() 116 rc = nxt_unit_response_add_field(req, in ws_chat_root() 120 return rc; in ws_chat_root() 123 rc = nxt_unit_response_add_field(req, in ws_chat_root() 128 return rc; in ws_chat_root() [all …]
|
H A D | nxt_unit_app_test.c | 123 int rc; in worker() local 133 rc = nxt_unit_run(ctx); in worker() 139 return (void *) (intptr_t) rc; in worker() 146 int rc; in greeting_app_request_handler() local 159 if (nxt_slow_path(rc != NXT_UNIT_OK)) { in greeting_app_request_handler() 163 rc = nxt_unit_response_add_field(req, in greeting_app_request_handler() 166 if (nxt_slow_path(rc != NXT_UNIT_OK)) { in greeting_app_request_handler() 176 rc = nxt_unit_response_send(req); in greeting_app_request_handler() 206 rc = NXT_UNIT_ERROR; in greeting_app_request_handler() 267 rc = nxt_unit_buf_send(buf); in greeting_app_request_handler() [all …]
|
H A D | nxt_unit_websocket_echo.c | 19 int rc; in ws_echo_request_handler() local 22 rc = NXT_UNIT_OK; in ws_echo_request_handler() 30 rc = nxt_unit_response_init(req, 101, 0, 0); in ws_echo_request_handler() 31 if (nxt_slow_path(rc != NXT_UNIT_OK)) { in ws_echo_request_handler() 43 rc = nxt_unit_response_init(req, 404, 0, 0); in ws_echo_request_handler() 47 nxt_unit_request_done(req, rc); in ws_echo_request_handler()
|
H A D | nxt_http_parse_test.c | 532 nxt_int_t rc; in nxt_http_parse_test() local 540 rc = nxt_http_fields_hash(&nxt_http_test_fields_hash, in nxt_http_parse_test() 543 if (rc != NXT_OK) { in nxt_http_parse_test() 567 if (rc != test->result) { in nxt_http_parse_test() 609 if (rc != NXT_OK) { in nxt_http_parse_test() 634 nxt_int_t rc; in nxt_http_parse_test_run() local 645 rc = nxt_http_parse_request(rp, &buf); in nxt_http_parse_test_run() 646 } while (buf.free < buf.end && rc == NXT_AGAIN); in nxt_http_parse_test_run() 648 return rc; in nxt_http_parse_test_run() 799 nxt_int_t rc; in nxt_http_parse_test_fields() local [all …]
|
/unit/src/ |
H A D | nxt_external.c | 68 nxt_int_t rc; in nxt_external_start() local 90 if (nxt_slow_path(rc != NXT_OK)) { in nxt_external_start() 95 if (nxt_slow_path(rc != NXT_OK)) { in nxt_external_start() 99 rc = nxt_external_fd_no_cloexec(task, my_port->pair[0]); in nxt_external_start() 100 if (nxt_slow_path(rc != NXT_OK)) { in nxt_external_start() 104 rc = nxt_external_fd_no_cloexec(task, my_port->pair[1]); in nxt_external_start() 105 if (nxt_slow_path(rc != NXT_OK)) { in nxt_external_start() 110 if (nxt_slow_path(rc != NXT_OK)) { in nxt_external_start() 115 if (nxt_slow_path(rc != NXT_OK)) { in nxt_external_start() 144 rc = setenv(NXT_UNIT_INIT_ENV, (char *) buf, 1); in nxt_external_start() [all …]
|
H A D | nxt_http_js.c | 185 njs_int_t rc; in nxt_http_js_ext_get_header() local 197 if (rc != NJS_OK) { in nxt_http_js_ext_get_header() 222 njs_int_t rc; in nxt_http_js_ext_keys_header() local 226 rc = njs_vm_array_alloc(vm, keys, 4); in nxt_http_js_ext_keys_header() 227 if (rc != NJS_OK) { in nxt_http_js_ext_keys_header() 244 if (rc != NJS_OK) { in nxt_http_js_ext_keys_header() 258 njs_int_t rc; in nxt_http_js_ext_get_cookie() local 271 if (rc != NJS_OK) { in nxt_http_js_ext_get_cookie() 303 njs_int_t rc; in nxt_http_js_ext_keys_cookie() local 309 if (rc != NJS_OK) { in nxt_http_js_ext_keys_cookie() [all …]
|
H A D | nxt_java.c | 340 if (rc != JNI_OK) { in nxt_java_start() 346 if (rc != NXT_UNIT_OK) { in nxt_java_start() 352 if (rc != NXT_UNIT_OK) { in nxt_java_start() 374 if (rc != NXT_UNIT_OK) { in nxt_java_start() 380 if (rc != NXT_UNIT_OK) { in nxt_java_start() 386 if (rc != NXT_UNIT_OK) { in nxt_java_start() 392 if (rc != NXT_UNIT_OK) { in nxt_java_start() 447 rc = nxt_unit_run(ctx); in nxt_java_start() 461 exit(rc); in nxt_java_start() 647 int rc; in nxt_java_thread_func() local [all …]
|
H A D | nxt_unit.c | 673 int rc; in nxt_unit_ctx_init() local 1177 return rc; in nxt_unit_process_msg() 2387 return rc; in nxt_unit_response_send() 2742 return rc; in nxt_unit_mmap_buf_send() 3411 return rc; in nxt_unit_websocket_sendv() 4085 return rc; in nxt_unit_incoming_mmap() 4556 return rc; in nxt_unit_run() 4563 int rc; in nxt_unit_run_once() local 4571 return rc; in nxt_unit_run_once() 4605 return rc; in nxt_unit_run_once_impl() [all …]
|
H A D | nxt_http_parse.c | 126 nxt_int_t rc; in nxt_http_parse_request() local 133 rc = rp->handler(rp, &b->pos, b->free); in nxt_http_parse_request() 134 } while (rc == NXT_OK); in nxt_http_parse_request() 136 return rc; in nxt_http_parse_request() 143 nxt_int_t rc; in nxt_http_parse_fields() local 151 } while (rc == NXT_OK); in nxt_http_parse_fields() 153 return rc; in nxt_http_parse_fields() 162 nxt_int_t rc; in nxt_http_parse_request_line() local 246 if (nxt_slow_path(rc != NXT_OK)) { in nxt_http_parse_request_line() 247 return rc; in nxt_http_parse_request_line() [all …]
|
H A D | nxt_controller.c | 427 nxt_int_t rc; in nxt_controller_send_current_conf() local 596 nxt_int_t rc; in nxt_controller_conf_send() local 646 if (nxt_slow_path(rc != NXT_OK)) { in nxt_controller_conf_send() 778 nxt_int_t rc; in nxt_controller_conn_read() local 796 if (rc == NXT_AGAIN) { in nxt_controller_conn_read() 1271 nxt_int_t rc; in nxt_controller_process_config() local 1367 switch (rc) { in nxt_controller_process_config() 1399 if (rc == NXT_DECLINED) { in nxt_controller_process_config() 1447 if (rc != NXT_OK) { in nxt_controller_process_config() 1571 nxt_int_t rc; in nxt_controller_process_status() local [all …]
|
H A D | nxt_fs_mount.c | 18 int rc; in nxt_fs_mount() local 65 rc = mount((const char *) mnt->src, (const char *) mnt->dst, fsname, flags, in nxt_fs_mount() 68 if (nxt_slow_path(rc < 0)) { in nxt_fs_mount()
|
H A D | nxt_conf.c | 950 nxt_int_t rc; in nxt_conf_clone() local 960 if (nxt_slow_path(rc != NXT_OK)) { in nxt_conf_clone() 1016 nxt_int_t rc; in nxt_conf_copy_array() local 1060 if (nxt_slow_path(rc != NXT_OK)) { in nxt_conf_copy_array() 1116 nxt_int_t rc; in nxt_conf_copy_object() local 1160 rc = nxt_conf_copy_value(mp, NULL, in nxt_conf_copy_object() 1164 if (nxt_slow_path(rc != NXT_OK)) { in nxt_conf_copy_object() 1172 if (nxt_slow_path(rc != NXT_OK)) { in nxt_conf_copy_object() 1488 nxt_int_t rc; in nxt_conf_json_parse_object() local 1549 if (nxt_slow_path(rc != NXT_OK)) { in nxt_conf_json_parse_object() [all …]
|
H A D | nxt_conn_write.c | 253 int rc = sendfile(fd, s, pos, &sent, NULL, 0); in nxt_sendfile() local 255 res = (rc == 0 || sent > 0) ? sent : -1; in nxt_sendfile() 261 int rc = sendfile(fd, s, pos, size, NULL, &sent, 0); in nxt_sendfile() local 263 res = (rc == 0 || sent > 0) ? sent : -1; in nxt_sendfile()
|
H A D | nxt_php_sapi.c | 1293 int rc; local 1298 rc = nxt_unit_response_write(ctx->req, str, str_length); 1299 if (nxt_fast_path(rc == NXT_UNIT_OK)) { 1311 int rc, fields_count; local 1326 rc = nxt_unit_response_init(req, 200, 0, 0); 1327 if (nxt_slow_path(rc != NXT_UNIT_OK)) { 1346 rc = nxt_unit_response_init(req, status, fields_count, resp_size); 1347 if (nxt_slow_path(rc != NXT_UNIT_OK)) { 1372 rc = nxt_unit_response_send(req); 1373 if (nxt_slow_path(rc != NXT_UNIT_OK)) {
|
/unit/src/java/ |
H A D | nxt_jni_OutputStream.c | 107 int rc; in nxt_java_OutputStream_flush_buf() local 114 if (rc != NXT_UNIT_OK) { in nxt_java_OutputStream_flush_buf() 117 return rc; in nxt_java_OutputStream_flush_buf() 122 rc = nxt_unit_response_send(req); in nxt_java_OutputStream_flush_buf() 123 if (rc != NXT_UNIT_OK) { in nxt_java_OutputStream_flush_buf() 126 return rc; in nxt_java_OutputStream_flush_buf() 132 if (rc != NXT_UNIT_OK) { in nxt_java_OutputStream_flush_buf() 140 rc = NXT_UNIT_OK; in nxt_java_OutputStream_flush_buf() 143 return rc; in nxt_java_OutputStream_flush_buf() 178 int rc; in nxt_java_OutputStream_write() local [all …]
|
H A D | nxt_jni_Response.c | 264 int rc; in nxt_java_Response_addHeader() local 293 if (rc != NXT_UNIT_OK) { in nxt_java_Response_addHeader() 306 int rc; in nxt_java_get_response_info() local 326 if (rc != NXT_UNIT_OK) { in nxt_java_get_response_info() 655 if (rc != NXT_UNIT_OK) { in nxt_java_Response_sendRedirect() 753 if (rc != NXT_UNIT_OK) { in nxt_java_Response_setHeader() 781 if (rc != NXT_UNIT_OK) { in nxt_java_Response_removeHeader() 826 int value_len, rc; in nxt_java_Response_setIntHeader() local 844 if (rc != NXT_UNIT_OK) { in nxt_java_Response_setIntHeader() 1029 int rc; in nxt_java_Response_setContentType() local [all …]
|
/unit/src/ruby/ |
H A D | nxt_ruby.c | 409 exit(rc); in nxt_ruby_start() 551 int rc; in nxt_ruby_rack_env_create() local 851 rc = NXT_UNIT_OK; in nxt_ruby_rack_result_headers() 867 return rc; in nxt_ruby_rack_result_headers() 873 return rc; in nxt_ruby_rack_result_headers() 942 rc = &headers_info->rc; in nxt_ruby_hash_add() 982 *rc = NXT_UNIT_ERROR; in nxt_ruby_hash_add() 991 int rc; in nxt_ruby_rack_result_body() local 1009 return rc; in nxt_ruby_rack_result_body() 1090 rc = fstat(fd, &finfo); in nxt_ruby_rack_result_body_file_write() [all …]
|
/unit/src/python/ |
H A D | nxt_python_wsgi.c | 283 int rc; in nxt_python_wsgi_run() local 290 rc = nxt_unit_run(ctx); in nxt_python_wsgi_run() 294 return rc; in nxt_python_wsgi_run() 310 int rc; in nxt_python_request_handler() local 342 rc = NXT_UNIT_ERROR; in nxt_python_request_handler() 595 int rc; in nxt_python_get_environ() local 1056 int rc; in nxt_python_response_add_field() local 1097 return rc; in nxt_python_response_add_field() 1126 int rc; in nxt_py_write() local 1355 int rc; in nxt_python_write() local [all …]
|
H A D | nxt_python_asgi_websocket.c | 256 int rc; in nxt_py_asgi_websocket_accept() local 318 if (nxt_slow_path(rc != NXT_UNIT_OK)) { in nxt_py_asgi_websocket_accept() 345 rc = nxt_unit_response_send(ws->req); in nxt_py_asgi_websocket_accept() 361 int rc; in nxt_py_asgi_websocket_close() local 419 int rc; in nxt_py_asgi_websocket_send_frame() local 673 int rc; in nxt_py_asgi_websocket_suspend_frame() local 1045 int rc; in nxt_py_asgi_websocket_done() local 1064 rc = NXT_UNIT_ERROR; in nxt_py_asgi_websocket_done() 1069 rc = NXT_UNIT_OK; in nxt_py_asgi_websocket_done() 1073 status_code = (rc == NXT_UNIT_OK) in nxt_py_asgi_websocket_done() [all …]
|
H A D | nxt_python_asgi_http.c | 301 int rc; in nxt_py_asgi_http_response_start() local 327 rc = nxt_unit_response_init(http->req, PyLong_AsLong(status), in nxt_py_asgi_http_response_start() 330 if (nxt_slow_path(rc != NXT_UNIT_OK)) { in nxt_py_asgi_http_response_start() 358 int rc; in nxt_py_asgi_http_response_body() local 448 rc = nxt_unit_response_send(http->req); in nxt_py_asgi_http_response_body() 449 if (nxt_slow_path(rc != NXT_UNIT_OK)) { in nxt_py_asgi_http_response_body() 650 int rc; in nxt_py_asgi_http_done() local 668 rc = NXT_UNIT_ERROR; in nxt_py_asgi_http_done() 673 rc = NXT_UNIT_OK; in nxt_py_asgi_http_done() 676 nxt_unit_request_done(http->req, rc); in nxt_py_asgi_http_done()
|
H A D | nxt_python.c | 149 int rc; in nxt_python_start() local 338 rc = nxt_python_asgi_init(&python_init, &nxt_py_proto); in nxt_python_start() 341 rc = nxt_python_wsgi_init(&python_init, &nxt_py_proto); in nxt_python_start() 344 if (nxt_slow_path(rc == NXT_UNIT_ERROR)) { in nxt_python_start() 348 rc = nxt_py_proto.ctx_data_alloc(&python_init.ctx_data, 1); in nxt_python_start() 349 if (nxt_slow_path(rc != NXT_UNIT_OK)) { in nxt_python_start() 353 rc = nxt_python_init_threads(c); in nxt_python_start() 354 if (nxt_slow_path(rc == NXT_UNIT_ERROR)) { in nxt_python_start() 369 rc = nxt_py_proto.run(unit_ctx); in nxt_python_start() 379 exit(rc); in nxt_python_start()
|
H A D | nxt_python_asgi.c | 1028 int rc; in nxt_py_asgi_add_reader() local 1044 rc = NXT_UNIT_ERROR; in nxt_py_asgi_add_reader() 1072 rc = NXT_UNIT_OK; in nxt_py_asgi_add_reader() 1085 return rc; in nxt_py_asgi_add_reader() 1137 int rc; in nxt_py_asgi_shm_ack_handler() local 1146 rc = nxt_py_asgi_http_drain(lnk); in nxt_py_asgi_shm_ack_handler() 1147 if (rc == NXT_UNIT_AGAIN) { in nxt_py_asgi_shm_ack_handler() 1159 int rc; in nxt_py_asgi_port_read() local 1201 if (rc == NXT_UNIT_OK) { in nxt_py_asgi_port_read() 1307 int rc; in nxt_py_asgi_add_field() local [all …]
|
/unit/src/perl/ |
H A D | nxt_perl_psgi.c | 784 int rc; in nxt_perl_psgi_result_head() local 837 return rc; in nxt_perl_psgi_result_head() 849 return rc; in nxt_perl_psgi_result_head() 863 int rc; in nxt_perl_psgi_result_body() local 913 int rc; in nxt_perl_psgi_result_body_ref() local 930 rc = NXT_UNIT_OK; in nxt_perl_psgi_result_body_ref() 966 return rc; in nxt_perl_psgi_result_body_ref() 1026 int rc; in nxt_perl_psgi_result_array() local 1186 exit(rc); in nxt_perl_psgi_start() 1344 strerror(rc), rc); in nxt_perl_psgi_init_threads() [all …]
|
/unit/go/ |
H A D | nxt_cgo_lib.c | 21 int rc; in nxt_cgo_run() local 42 rc = nxt_unit_run_ctx(ctx); in nxt_cgo_run() 46 return rc; in nxt_cgo_run()
|
H A D | unit.go | 148 rc := C.nxt_cgo_run(C.uintptr_t(h)) 152 if rc != 0 {
|