diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-10-12 13:50:36 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-10-12 13:50:36 +0000 |
commit | 784522377ec160bc148ff3bb40fb87ede7506d5d (patch) | |
tree | 0c76a9c51a1c2ffa35ad3eb05e3b80f6cc19c60a /src/core/ngx_string.c | |
parent | bbfe3033bc82427b15ccf73767e786cbb12a7627 (diff) | |
download | nginx-release-0.3.2.tar.gz nginx-release-0.3.2.zip |
nginx-0.3.2-RELEASE importrelease-0.3.2
*) Feature: the Sun Studio 10 C compiler support.
*) Feature: the "proxy_upstream_max_fails",
"proxy_upstream_fail_timeout", "fastcgi_upstream_max_fails", and
"fastcgi_upstream_fail_timeout" directives.
Diffstat (limited to 'src/core/ngx_string.c')
-rw-r--r-- | src/core/ngx_string.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c index 93449abcc..1164cc445 100644 --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -115,6 +115,7 @@ ngx_vsnprintf(u_char *buf, size_t max, const char *fmt, va_list args) uint32_t ui32; int64_t i64; uint64_t ui64; + ngx_msec_t ms; ngx_str_t *s; ngx_uint_t width, sign, hexadecimal, max_width; static u_char hex[] = "0123456789abcdef"; @@ -221,8 +222,14 @@ ngx_vsnprintf(u_char *buf, size_t max, const char *fmt, va_list args) break; case 'M': - ui64 = (uint64_t) va_arg(args, ngx_msec_t); - sign = 0; + ms = (ngx_msec_t) va_arg(args, ngx_msec_t); + if ((ngx_msec_int_t) ms == -1) { + sign = 1; + i64 = -1; + } else { + sign = 0; + ui64 = (uint64_t) ms; + } break; case 'z': |