nxt_sendbuf.c (203:7794b01dd5aa) nxt_sendbuf.c (352:47649fbbcb53)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

106
107 size = b->mem.free - b->mem.pos;
108
109 if (size != 0) {
110
111 if (total + size > sb->limit) {
112 size = sb->limit - total;
113
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

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

106
107 size = b->mem.free - b->mem.pos;
108
109 if (size != 0) {
110
111 if (total + size > sb->limit) {
112 size = sb->limit - total;
113
114 if (size == 0) {
114 sb->limit_reached = 1;
115
116 if (nxt_slow_path(size == 0)) {
115 break;
116 }
117 }
118
119 if (b->mem.pos != last) {
120
121 if (++n >= sb->nmax) {
117 break;
118 }
119 }
120
121 if (b->mem.pos != last) {
122
123 if (++n >= sb->nmax) {
124 sb->nmax_reached = 1;
125
122 goto done;
123 }
124
125 sb->iobuf[n].iov_base = b->mem.pos;
126 sb->iobuf[n].iov_len = size;
127
128 } else {
129 sb->iobuf[n].iov_len += size;

--- 303 unchanged lines hidden ---
126 goto done;
127 }
128
129 sb->iobuf[n].iov_base = b->mem.pos;
130 sb->iobuf[n].iov_len = size;
131
132 } else {
133 sb->iobuf[n].iov_len += size;

--- 303 unchanged lines hidden ---