From d404c9716322cfe8778e7494e55efb924f35ecaa Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 16 Oct 2003 20:19:16 +0000 Subject: nginx-0.0.1-2003-10-17-00:19:16 import --- src/core/ngx_core.h | 2 +- src/core/ngx_hunk.h | 13 ++++++------- src/core/ngx_modules.c | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h index 3a0e9dd2e..652647100 100644 --- a/src/core/ngx_core.h +++ b/src/core/ngx_core.h @@ -36,11 +36,11 @@ typedef struct ngx_connection_s ngx_connection_t; #define NGX_OK 0 #define NGX_ERROR -1 #define NGX_AGAIN -2 +#define NGX_DONE -3 #define NGX_DECLINED -4 #define NGX_ABORT -5 /* -#define NGX_DONE -3 #define NGX_BUSY -3 #define NGX_ALERT -5 */ diff --git a/src/core/ngx_hunk.h b/src/core/ngx_hunk.h index a66d47610..3a10076cc 100644 --- a/src/core/ngx_hunk.h +++ b/src/core/ngx_hunk.h @@ -85,9 +85,9 @@ typedef struct { (h->type == (h->type & (NGX_HUNK_FLUSH|NGX_HUNK_LAST))) -#define nxg_hunk_size(h) \ - (h->type & NGX_HUNK_IN_MEMORY) ? h->last - h->pos: \ - (size_t) h->file_last - h->file_pos +#define ngx_hunk_size(h) \ + ((h->type & NGX_HUNK_IN_MEMORY) ? 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, @@ -108,14 +108,13 @@ ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, #define ngx_alloc_ce_and_set_hunk ngx_add_hunk_to_chain -#define ngx_chain_add_ce(ngx_chain_t *chain, ngx_chain_t **last, \ - ngx_chain_t *ce) \ +#define ngx_chain_add_ce(chain, last, ce) \ if (chain) { \ - last->next = ce; \ + *last = ce; \ } else { \ chain = ce; \ } \ - last = ce; + last = &ce->next int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in); diff --git a/src/core/ngx_modules.c b/src/core/ngx_modules.c index d7268c9eb..dfe0243ad 100644 --- a/src/core/ngx_modules.c +++ b/src/core/ngx_modules.c @@ -89,7 +89,7 @@ ngx_module_t *ngx_modules[] = { /* &ngx_http_ssi_filter_module, */ &ngx_http_charset_filter_module, - /* &ngx_http_static_module, */ + &ngx_http_static_module, &ngx_http_index_module, &ngx_http_proxy_module, -- cgit