comparison src/os/unix/ngx_writev_chain.c @ 144:ef8c87afcfc5

nginx-0.0.1-2003-10-12-20:49:16 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 12 Oct 2003 16:49:16 +0000
parents 6dfda4cf5200
children c42be4185301
comparison
equal deleted inserted replaced
143:5526213be452 144:ef8c87afcfc5
1 1
2 #include <ngx_config.h> 2 #include <ngx_config.h>
3 #include <ngx_core.h> 3 #include <ngx_core.h>
4 #include <ngx_event.h>
4 5
5 6
6 ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in) 7 ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in)
7 { 8 {
8 char *prev; 9 char *prev;
10 off_t sent; 11 off_t sent;
11 struct iovec *iov; 12 struct iovec *iov;
12 ngx_err_t err; 13 ngx_err_t err;
13 ngx_array_t iovecs; 14 ngx_array_t iovecs;
14 ngx_chain_t *ce; 15 ngx_chain_t *ce;
16
17 if (!c->write->ready) {
18 return in;
19 }
15 20
16 ngx_init_array(iovecs, c->pool, 10, sizeof(struct iovec), NGX_CHAIN_ERROR); 21 ngx_init_array(iovecs, c->pool, 10, sizeof(struct iovec), NGX_CHAIN_ERROR);
17 22
18 prev = NULL; 23 prev = NULL;
19 iov = NULL; 24 iov = NULL;