comparison src/core/ngx_file.c @ 250:fbf2b2f66c9f NGINX_0_4_10

nginx 0.4.10 *) Feature: the POP3 proxy supports the APOP command. *) Bugfix: if the select, poll or /dev/poll methods were used, then while waiting authentication server response the IMAP/POP3 proxy hogged CPU. *) Bugfix: a segmentation fault might occur if the $server_addr variable was used in the "map" directive. *) Bugfix: the ngx_http_flv_module did not support the byte ranges for full responses; bug appeared in 0.4.7. *) Bugfix: nginx could not be built on Debian amd64; bug appeared in 0.4.9.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Oct 2006 00:00:00 +0400
parents 1bf60f8c5c9e
children 29a6403156b0
comparison
equal deleted inserted replaced
249:7a34085272cb 250:fbf2b2f66c9f
7 #include <ngx_config.h> 7 #include <ngx_config.h>
8 #include <ngx_core.h> 8 #include <ngx_core.h>
9 9
10 10
11 static ngx_atomic_uint_t ngx_temp_number; 11 static ngx_atomic_uint_t ngx_temp_number;
12 static ngx_atomic_uint_t ngx_random; 12 static ngx_atomic_uint_t ngx_random_number;
13 13
14 14
15 ssize_t 15 ssize_t
16 ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain) 16 ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain)
17 { 17 {
214 214
215 void 215 void
216 ngx_init_temp_number(void) 216 ngx_init_temp_number(void)
217 { 217 {
218 ngx_temp_number = 0; 218 ngx_temp_number = 0;
219 ngx_random = 123456; 219 ngx_random_number = 123456;
220 } 220 }
221 221
222 222
223 ngx_atomic_uint_t 223 ngx_atomic_uint_t
224 ngx_next_temp_number(ngx_uint_t collision) 224 ngx_next_temp_number(ngx_uint_t collision)
225 { 225 {
226 if (collision) { 226 if (collision) {
227 ngx_temp_number += ngx_random; 227 ngx_temp_number += ngx_random_number;
228 } 228 }
229 229
230 return ngx_temp_number++; 230 return ngx_temp_number++;
231 } 231 }
232 232