nxt_router.c (493:745222d540a2) nxt_router.c (494:7c83ddcc1c42)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_router.h>

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

706 nxt_buf_t *b;
707 nxt_router_temp_conf_t *tmcf;
708
709 tmcf = nxt_router_temp_conf(task);
710 if (nxt_slow_path(tmcf == NULL)) {
711 return;
712 }
713
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_router.h>

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

706 nxt_buf_t *b;
707 nxt_router_temp_conf_t *tmcf;
708
709 tmcf = nxt_router_temp_conf(task);
710 if (nxt_slow_path(tmcf == NULL)) {
711 return;
712 }
713
714 nxt_debug(task, "nxt_router_conf_data_handler(%d): %*s",
714 nxt_debug(task, "nxt_router_conf_data_handler(%O): %*s",
715 nxt_buf_used_size(msg->buf),
716 (size_t) nxt_buf_used_size(msg->buf), msg->buf->mem.pos);
717
718 b = nxt_buf_chk_make_plain(tmcf->conf->mem_pool, msg->buf, msg->size);
719
720 nxt_assert(b != NULL);
721
722 tmcf->conf->router = nxt_router;

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

2386 rc = data;
2387
2388 dump_size = nxt_buf_used_size(b);
2389
2390 if (dump_size > 300) {
2391 dump_size = 300;
2392 }
2393
715 nxt_buf_used_size(msg->buf),
716 (size_t) nxt_buf_used_size(msg->buf), msg->buf->mem.pos);
717
718 b = nxt_buf_chk_make_plain(tmcf->conf->mem_pool, msg->buf, msg->size);
719
720 nxt_assert(b != NULL);
721
722 tmcf->conf->router = nxt_router;

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

2386 rc = data;
2387
2388 dump_size = nxt_buf_used_size(b);
2389
2390 if (dump_size > 300) {
2391 dump_size = 300;
2392 }
2393
2394 nxt_debug(task, "%srouter app data (%z): %*s",
2394 nxt_debug(task, "%srouter app data (%uz): %*s",
2395 msg->port_msg.last ? "last " : "", msg->size, dump_size,
2396 b->mem.pos);
2397
2398 if (msg->size == 0) {
2399 b = NULL;
2400 }
2401
2402 ar = rc->ap;

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

3222 res = port->app->prepare_msg(task, &ap->r, &wmsg);
3223
3224 if (nxt_slow_path(res != NXT_OK)) {
3225 nxt_router_ra_error(ra, 500,
3226 "Failed to prepare message for application");
3227 goto release_port;
3228 }
3229
2395 msg->port_msg.last ? "last " : "", msg->size, dump_size,
2396 b->mem.pos);
2397
2398 if (msg->size == 0) {
2399 b = NULL;
2400 }
2401
2402 ar = rc->ap;

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

3222 res = port->app->prepare_msg(task, &ap->r, &wmsg);
3223
3224 if (nxt_slow_path(res != NXT_OK)) {
3225 nxt_router_ra_error(ra, 500,
3226 "Failed to prepare message for application");
3227 goto release_port;
3228 }
3229
3230 nxt_debug(task, "about to send %d bytes buffer to worker port %d",
3230 nxt_debug(task, "about to send %O bytes buffer to worker port %d",
3231 nxt_buf_used_size(wmsg.write),
3232 wmsg.port->socket.fd);
3233
3234 request_failed = 0;
3235
3236 ra->msg_info.buf = wmsg.write;
3237 ra->msg_info.completion_handler = wmsg.write->completion_handler;
3238

--- 354 unchanged lines hidden ---
3231 nxt_buf_used_size(wmsg.write),
3232 wmsg.port->socket.fd);
3233
3234 request_failed = 0;
3235
3236 ra->msg_info.buf = wmsg.write;
3237 ra->msg_info.completion_handler = wmsg.write->completion_handler;
3238

--- 354 unchanged lines hidden ---