Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4598 - trunk/src/os/unix

Anonymous User
April 17, 2012 05:16AM
Author: mdounin
Date: 2012-04-17 09:13:58 +0000 (Tue, 17 Apr 2012)
New Revision: 4598
URL: http://trac.nginx.org/nginx/changeset/4598/nginx

Log:
Fixed ngx_readv_chain() to honor IOV_MAX (ticket #14).

Not using full chain passed is ok as consumers are expected to check
event's ready flag to determine if another call is needed, not the
returned size.


Modified:
trunk/src/os/unix/ngx_readv_chain.c

Modified: trunk/src/os/unix/ngx_readv_chain.c
===================================================================
--- trunk/src/os/unix/ngx_readv_chain.c 2012-04-17 09:13:15 UTC (rev 4597)
+++ trunk/src/os/unix/ngx_readv_chain.c 2012-04-17 09:13:58 UTC (rev 4598)
@@ -71,6 +71,10 @@
iov->iov_len += chain->buf->end - chain->buf->last;

} else {
+ if (vec.nelts >= IOV_MAX) {
+ break;
+ }
+
iov = ngx_array_push(&vec);
if (iov == NULL) {
return NGX_ERROR;
@@ -195,6 +199,10 @@
iov->iov_len += chain->buf->end - chain->buf->last;

} else {
+ if (vec.nelts >= IOV_MAX) {
+ break;
+ }
+
iov = ngx_array_push(&vec);
if (iov == NULL) {
return NGX_ERROR;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4598 - trunk/src/os/unix

Anonymous User 1091 April 17, 2012 05:16AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 117
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready