Mercurial > hg > nginx
changeset 167:8aef3c72e5da
nginx-0.0.1-2003-10-30-19:51:33 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 30 Oct 2003 16:51:33 +0000 |
parents | 389d7ee9fa60 |
children | ba5dbb949603 |
files | src/core/ngx_conf_file.c src/core/ngx_hunk.c src/core/ngx_hunk.h src/core/ngx_output_chain.c src/event/modules/ngx_devpoll_module.c src/event/ngx_event_connect.c src/os/unix/ngx_solaris_config.h |
diffstat | 7 files changed, 29 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c Thu Oct 30 08:51:06 2003 +0000 +++ b/src/core/ngx_conf_file.c Thu Oct 30 16:51:33 2003 +0000 @@ -741,7 +741,7 @@ } bufs->size = ngx_parse_size(&value[2]); - if (bufs->size == NGX_ERROR || bufs->size == 0) { + if (bufs->size == (size_t) NGX_ERROR || bufs->size == 0) { return "invalid value"; }
--- a/src/core/ngx_hunk.c Thu Oct 30 08:51:06 2003 +0000 +++ b/src/core/ngx_hunk.c Thu Oct 30 16:51:33 2003 +0000 @@ -115,7 +115,7 @@ *out = NULL; while (*busy) { - if (ngx_hunk_size((*busy)->hunk) > 0) { + if (ngx_hunk_size((*busy)->hunk) != 0) { break; }
--- a/src/core/ngx_hunk.h Thu Oct 30 08:51:06 2003 +0000 +++ b/src/core/ngx_hunk.h Thu Oct 30 16:51:33 2003 +0000 @@ -67,7 +67,7 @@ typedef struct { int num; - ssize_t size; + size_t size; } ngx_bufs_t; @@ -117,8 +117,8 @@ #define ngx_hunk_size(h) \ - ((h->type & NGX_HUNK_IN_MEMORY) ? h->last - h->pos: \ - (size_t) (h->file_last - h->file_pos)) + ((h->type & NGX_HUNK_IN_MEMORY) ? (size_t) (h->last - h->pos): \ + (size_t) (h->file_last - h->file_pos)) ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size);
--- a/src/core/ngx_output_chain.c Thu Oct 30 08:51:06 2003 +0000 +++ b/src/core/ngx_output_chain.c Thu Oct 30 16:51:33 2003 +0000 @@ -16,7 +16,8 @@ int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) { int rc, last; - ssize_t size, hsize; + size_t hsize; + ssize_t size; ngx_chain_t *cl, *out, **last_out; /*
--- a/src/event/modules/ngx_devpoll_module.c Thu Oct 30 08:51:06 2003 +0000 +++ b/src/event/modules/ngx_devpoll_module.c Thu Oct 30 16:51:33 2003 +0000 @@ -41,7 +41,7 @@ static void *ngx_devpoll_create_conf(ngx_cycle_t *cycle); static char *ngx_devpoll_init_conf(ngx_cycle_t *cycle, void *conf); -static int dp; +static int dp = -1; static struct pollfd *change_list, *event_list; static u_int nchanges, max_changes, nevents;
--- a/src/event/ngx_event_connect.c Thu Oct 30 08:51:06 2003 +0000 +++ b/src/event/ngx_event_connect.c Thu Oct 30 16:51:33 2003 +0000 @@ -203,16 +203,32 @@ } if (ngx_event_flags & NGX_USE_AIO_EVENT) { + /* aio, iocp */ + + if (ngx_blocking(s) == -1) { + ngx_log_error(NGX_LOG_ALERT, pc->log, ngx_socket_errno, + ngx_blocking_n " failed"); + + if (ngx_close_socket(s) == -1) { + ngx_log_error(NGX_LOG_ALERT, pc->log, ngx_socket_errno, + ngx_close_socket_n " failed"); + } + + return NGX_ERROR; + } + + /* + * aio allows to post operation on non-connected socket + * at least in FreeBSD + * + * TODO: check in Win32, etc. + */ -#if 1 - /* TODO: NGX_EINPROGRESS */ - rev->ready = 1; wev->ready = 1; return NGX_OK; -#endif } /* TODO: epoll */
--- a/src/os/unix/ngx_solaris_config.h Thu Oct 30 08:51:06 2003 +0000 +++ b/src/os/unix/ngx_solaris_config.h Thu Oct 30 16:51:33 2003 +0000 @@ -9,6 +9,7 @@ #define _FILE_OFFSET_BITS 64 /* must be before sys/types.h */ #include <unistd.h> +#include <inttypes.h> #include <stddef.h> /* offsetof */ #include <stdlib.h> #include <stdarg.h>