aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_writev_chain.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-11-11 14:07:14 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-11-11 14:07:14 +0000
commit1b73583ba2c0e4b72d951218827e0c621427d389 (patch)
tree9e4d204e2cce91560d5cb8908b8a1a9f2c1d92ee /src/os/unix/ngx_writev_chain.c
parentd6f24959428caed68a509a19ca4fd866d978a69c (diff)
downloadnginx-1b73583ba2c0e4b72d951218827e0c621427d389.tar.gz
nginx-1b73583ba2c0e4b72d951218827e0c621427d389.zip
nginx-0.1.5-RELEASE importrelease-0.1.5
*) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
Diffstat (limited to 'src/os/unix/ngx_writev_chain.c')
-rw-r--r--src/os/unix/ngx_writev_chain.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/os/unix/ngx_writev_chain.c b/src/os/unix/ngx_writev_chain.c
index e57b59305..e3893226d 100644
--- a/src/os/unix/ngx_writev_chain.c
+++ b/src/os/unix/ngx_writev_chain.c
@@ -9,14 +9,14 @@
#include <ngx_event.h>
-#define NGX_IOVS 8
+#define NGX_IOVS 16
ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
{
u_char *prev;
- ssize_t n, size;
- off_t send, sprev, sent;
+ ssize_t n, size, sent;
+ off_t send, sprev;
ngx_uint_t eintr, complete;
ngx_err_t err;
ngx_array_t vec;
@@ -66,6 +66,12 @@ ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
continue;
}
+#if 1
+ if (!ngx_buf_in_memory(cl->buf)) {
+ ngx_debug_point();
+ }
+#endif
+
size = cl->buf->last - cl->buf->pos;
if (send + size > limit) {
@@ -110,8 +116,7 @@ ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
sent = n > 0 ? n : 0;
- ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "writev: " OFF_T_FMT, sent);
+ ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "writev: %z", sent);
if (send - sprev == sent) {
complete = 1;
@@ -119,7 +124,8 @@ ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
c->sent += sent;
- for (cl = in; cl && sent > 0; cl = cl->next) {
+ for (cl = in; cl; cl = cl->next) {
+
if (ngx_buf_special(cl->buf)) {
continue;
}