Mercurial > hg > nginx
comparison src/core/ngx_palloc.c @ 563:9c2f3ed7a247 release-0.3.3
nginx-0.3.3-RELEASE import
*) Change: the "bl" and "af" parameters of the "listen" directive was
renamed to the "backlog" and "accept_filter".
*) Feature: the "rcvbuf" and "sndbuf" parameters of the "listen"
directive.
*) Change: the "$msec" log parameter does not require now the
additional the gettimeofday() system call.
*) Feature: the -t switch now tests the "listen" directives.
*) Bugfix: if the invalid address was specified in the "listen"
directive, then after the -HUP signal nginx left an open socket in
the CLOSED state.
*) Bugfix: the mime type may be incorrectly set to default value for
index file with variable in the name; the bug had appeared in 0.3.0.
*) Feature: the "timer_resolution" directive.
*) Feature: the millisecond "$upstream_response_time" log parameter.
*) Bugfix: a temporary file with client request body now is removed
just after the response header was transferred to a client.
*) Bugfix: OpenSSL 0.9.6 compatibility.
*) Bugfix: the SSL certificate and key file paths could not be relative.
*) Bugfix: the "ssl_prefer_server_ciphers" directive did not work in
the ngx_imap_ssl_module.
*) Bugfix: the "ssl_protocols" directive allowed to specify the single
protocol only.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 19 Oct 2005 12:33:58 +0000 |
parents | 7fa11e5c6e96 |
children | 326634fb9d47 |
comparison
equal
deleted
inserted
replaced
562:4b6108f69026 | 563:9c2f3ed7a247 |
---|---|
205 return p; | 205 return p; |
206 } | 206 } |
207 | 207 |
208 | 208 |
209 ngx_pool_cleanup_t * | 209 ngx_pool_cleanup_t * |
210 ngx_pool_cleanup_add(ngx_pool_t *p, ngx_pool_cleanup_pt handler, void *data) | 210 ngx_pool_cleanup_add(ngx_pool_t *p, size_t size) |
211 { | 211 { |
212 ngx_pool_cleanup_t *c; | 212 ngx_pool_cleanup_t *c; |
213 | 213 |
214 c = ngx_palloc(p, sizeof(ngx_pool_cleanup_t)); | 214 c = ngx_palloc(p, sizeof(ngx_pool_cleanup_t)); |
215 if (c == NULL) { | 215 if (c == NULL) { |
216 return NULL; | 216 return NULL; |
217 } | 217 } |
218 | 218 |
219 c->handler = handler; | 219 if (size) { |
220 c->data = data; | 220 c->data = ngx_palloc(p, size); |
221 if (c->data == NULL) { | |
222 return NULL; | |
223 } | |
224 | |
225 } else { | |
226 c->data = NULL; | |
227 } | |
228 | |
229 c->handler = NULL; | |
221 c->next = p->cleanup; | 230 c->next = p->cleanup; |
222 | 231 |
223 p->cleanup = c; | 232 p->cleanup = c; |
233 | |
234 ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, p->log, 0, "add cleanup: %p", c); | |
224 | 235 |
225 return c; | 236 return c; |
226 } | 237 } |
227 | 238 |
228 | 239 |
229 void | 240 void |
230 ngx_pool_cleanup_file(void *data) | 241 ngx_pool_cleanup_file(void *data) |
231 { | 242 { |
232 ngx_pool_cleanup_file_t *c = data; | 243 ngx_pool_cleanup_file_t *c = data; |
244 | |
245 ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, c->log, 0, "run cleanup: %p, fd:%d", | |
246 c, c->fd); | |
233 | 247 |
234 if (ngx_close_file(c->fd) == NGX_FILE_ERROR) { | 248 if (ngx_close_file(c->fd) == NGX_FILE_ERROR) { |
235 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, | 249 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno, |
236 ngx_close_file_n " \"%s\" failed", c->name); | 250 ngx_close_file_n " \"%s\" failed", c->name); |
237 } | 251 } |