Unexpected initialization of
Anatoly Davidov <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello!
The latest snapshot mod_fastcgi-SNAP-0709231442.tar.gz moves
initialization of dynamic_last_io_time deeper in the code, but in the
wrong place.
From CHANGES:
2.4.3
...
*) Don't use initializers for timeval structs because on 64bit
MVS there is a padding field in between tv_sec and tv_usec.
[Eric Covener <covener gmail.com>]
Here is a fix:
diff -ur mod_fastcgi-SNAP-0709231442.orig/mod_fastcgi.c
mod_fastcgi-SNAP-0709231442/mod_fastcgi.c
--- mod_fastcgi-SNAP-0709231442.orig/mod_fastcgi.c 2007-09-23
22:56:37.000000000 +0500
+++ mod_fastcgi-SNAP-0709231442/mod_fastcgi.c 2007-10-15
16:07:45.000000000 +0500
@@ -1594,6 +1594,9 @@
pool * const rp = r->pool;
int is_connected = 0;
+ dynamic_last_io_time.tv_sec = 0;
+ dynamic_last_io_time.tv_usec = 0;
+
DWORD recv_count = 0;
if (fr->role == FCGI_RESPONDER)
@@ -1799,9 +1802,6 @@
/* timed out last pass */
struct timeval idle_time;
- dynamic_last_io_time.tv_sec = 0;
- dynamic_last_io_time.tv_usec = 0;
-
timersub(&fr->queueTime, &dynamic_last_io_time,
&idle_time);
if (idle_time.tv_sec > idle_timeout)
@@ -2003,6 +2003,9 @@
pool *rp = r->pool;
int is_connected = 0;
+ dynamic_last_io_time.tv_sec = 0;
+ dynamic_last_io_time.tv_usec = 0;
+
if (fr->role == FCGI_RESPONDER)
{
client_recv = (fr->expectingClientContent != 0);
@@ -2149,9 +2152,6 @@
/* timed out last pass */
struct timeval idle_time;
- dynamic_last_io_time.tv_sec = 0;
- dynamic_last_io_time.tv_usec = 0;
-
timersub(&fr->queueTime, &dynamic_last_io_time,
&idle_time);
if (idle_time.tv_sec > idle_timeout)
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/