diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ngx_config_command.c | 12 | ||||
-rw-r--r-- | src/core/ngx_config_command.h | 1 | ||||
-rw-r--r-- | src/core/ngx_connection.h | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/core/ngx_config_command.c b/src/core/ngx_config_command.c index 51943021b..e764fef23 100644 --- a/src/core/ngx_config_command.c +++ b/src/core/ngx_config_command.c @@ -12,3 +12,15 @@ char *ngx_conf_set_size_slot(char *conf, int offset, char *value) *(int *) (conf + offset) = size; return NULL; } + +char *ngx_conf_set_time_slot(char *conf, int offset, char *value) +{ + int size; + + size = atoi(value); + if (size < 0) + return "value must be greater or equal to zero"; + + *(int *) (conf + offset) = size; + return NULL; +} diff --git a/src/core/ngx_config_command.h b/src/core/ngx_config_command.h index 0990d44e4..e0ab9569f 100644 --- a/src/core/ngx_config_command.h +++ b/src/core/ngx_config_command.h @@ -17,6 +17,7 @@ typedef struct { } ngx_command_t; char *ngx_conf_set_size_slot(char *conf, int offset, char *value); +char *ngx_conf_set_time_slot(char *conf, int offset, char *value); #endif _NGX_HTTP_CONFIG_COMMAND_H_INCLUDED_ diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index f275f9156..2794a1c72 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -3,6 +3,7 @@ #include <ngx_socket.h> #include <ngx_log.h> +#include <ngx_hunk.h> #include <ngx_alloc.h> #include <ngx_server.h> @@ -36,6 +37,7 @@ struct ngx_connection_s { char *addr_text; size_t addr_textlen; + ngx_hunk_t *buffer; unsigned int post_accept_timeout; unsigned unexpected_eof:1; |