Mercurial > hg > nginx
diff src/core/ngx_file.c @ 75:869b10be682f
nginx-0.0.1-2003-04-14-21:04:58 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 14 Apr 2003 17:04:58 +0000 |
parents | 17ab1af8c3dd |
children | a7e45c45a95c |
line wrap: on
line diff
--- a/src/core/ngx_file.c Fri Apr 11 16:01:14 2003 +0000 +++ b/src/core/ngx_file.c Mon Apr 14 17:04:58 2003 +0000 @@ -28,7 +28,7 @@ for ( ;; ) { snprintf(file->name.data + path->name.len + 1 + path->len, 11, - "%010d", num); + "%010u", num); ngx_create_hashed_filename(file, path); @@ -49,6 +49,8 @@ file->fd = ngx_open_tempfile(file->name.data, persistent); +ngx_log_debug(file->log, "temp fd: %d" _ file->fd); + if (file->fd != NGX_INVALID_FILE) { return NGX_OK; } @@ -56,7 +58,7 @@ err = ngx_errno; if (err == NGX_EEXIST) { - num *= step; + num = (num + 1) * step; continue; }