nxt_port_memory.c (494:7c83ddcc1c42) nxt_port_memory.c (521:93dc4a28dd37)
1
2/*
3 * Copyright (C) Max Romanov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

549 nxt_bool_t res;
550 nxt_chunk_id_t c;
551 nxt_port_mmap_header_t *hdr;
552 nxt_port_mmap_handler_t *mmap_handler;
553 nxt_port_mmap_tracking_msg_t *tracking_msg;
554
555 b = msg->buf;
556
1
2/*
3 * Copyright (C) Max Romanov
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

549 nxt_bool_t res;
550 nxt_chunk_id_t c;
551 nxt_port_mmap_header_t *hdr;
552 nxt_port_mmap_handler_t *mmap_handler;
553 nxt_port_mmap_tracking_msg_t *tracking_msg;
554
555 b = msg->buf;
556
557 if (nxt_buf_used_size(b) < (int)sizeof(nxt_port_mmap_tracking_msg_t)) {
557 if (nxt_buf_used_size(b) < (int) sizeof(nxt_port_mmap_tracking_msg_t)) {
558 nxt_debug(task, "too small message %O", nxt_buf_used_size(b));
559 return 0;
560 }
561
562 tracking_msg = (nxt_port_mmap_tracking_msg_t *) b->mem.pos;
563
564 b->mem.pos += sizeof(nxt_port_mmap_tracking_msg_t);
565 mmap_handler = nxt_port_get_port_incoming_mmap(task, msg->port_msg.pid,

--- 363 unchanged lines hidden ---
558 nxt_debug(task, "too small message %O", nxt_buf_used_size(b));
559 return 0;
560 }
561
562 tracking_msg = (nxt_port_mmap_tracking_msg_t *) b->mem.pos;
563
564 b->mem.pos += sizeof(nxt_port_mmap_tracking_msg_t);
565 mmap_handler = nxt_port_get_port_incoming_mmap(task, msg->port_msg.pid,

--- 363 unchanged lines hidden ---