diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-06-23 19:20:08 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-06-23 19:20:08 +0300 |
commit | eaf28db46e81787a89b7f962e8bb53b142747a5e (patch) | |
tree | f4bd4e5867c280ce20f330b744f3bbb9fc3726ff /src/nxt_port_memory.c | |
parent | 3e989a165cd9cee60bd540f0fc6b0d61b41423ae (diff) | |
download | unit-eaf28db46e81787a89b7f962e8bb53b142747a5e.tar.gz unit-eaf28db46e81787a89b7f962e8bb53b142747a5e.tar.bz2 |
Moved message size to nxt_port_recv_msg_t for convenience.
Diffstat (limited to 'src/nxt_port_memory.c')
-rw-r--r-- | src/nxt_port_memory.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c index 5832ca25..eabc2e2f 100644 --- a/src/nxt_port_memory.c +++ b/src/nxt_port_memory.c @@ -594,7 +594,7 @@ nxt_port_mmap_write(nxt_task_t *task, nxt_port_t *port, void nxt_port_mmap_read(nxt_task_t *task, nxt_port_t *port, - nxt_port_recv_msg_t *msg, size_t size) + nxt_port_recv_msg_t *msg) { nxt_buf_t *b, **pb; nxt_port_mmap_msg_t *end, *mmap_msg; @@ -605,6 +605,7 @@ nxt_port_mmap_read(nxt_task_t *task, nxt_port_t *port, end = (nxt_port_mmap_msg_t *) b->mem.free; pb = &msg->buf; + msg->size = 0; while (mmap_msg < end) { nxt_debug(task, "mmap_msg={%D, %D, %D} from %PI", @@ -619,6 +620,7 @@ nxt_port_mmap_read(nxt_task_t *task, nxt_port_t *port, break; } + msg->size += mmap_msg->size; pb = &(*pb)->next; mmap_msg++; } |