diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-04-14 17:04:58 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-04-14 17:04:58 +0000 |
commit | 9e4920b810e1e5e620d3c3638b20cef7446baa6d (patch) | |
tree | dbe4721aa1ae68ea087c2b8cd2898bfcfba4b105 /src/core/ngx_file.c | |
parent | fd67586ef670a2ed181bb19d60619714f404aacc (diff) | |
download | nginx-9e4920b810e1e5e620d3c3638b20cef7446baa6d.tar.gz nginx-9e4920b810e1e5e620d3c3638b20cef7446baa6d.zip |
nginx-0.0.1-2003-04-14-21:04:58 import
Diffstat (limited to 'src/core/ngx_file.c')
-rw-r--r-- | src/core/ngx_file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c index b05372232..7576c9b5f 100644 --- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c @@ -28,7 +28,7 @@ int ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, 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 @@ int ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, 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 @@ int ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, err = ngx_errno; if (err == NGX_EEXIST) { - num *= step; + num = (num + 1) * step; continue; } |