The following reply was made to PR mod_log-any/2229; it has been noted by GNATS.
From: Dean Gaudet <[EMAIL PROTECTED]>
To: Wei Lin <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: mod_log-any/2229: Some log entries do not have full IP address
Date: Sun, 7 Jun 1998 23:29:40 -0700 (PDT)
Try this patch. mod_usertrack was corrupting the hostname.
Dean
Index: modules/standard/mod_usertrack.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_usertrack.c,v
retrieving revision 1.34
diff -u -r1.34 mod_usertrack.c
--- mod_usertrack.c 1998/04/11 12:00:53 1.34
+++ mod_usertrack.c 1998/06/08 06:08:56
@@ -137,13 +137,9 @@
/* 1024 == hardcoded constant */
char cookiebuf[1024];
char *new_cookie;
- char *dot;
const char *rname = ap_get_remote_host(r->connection, r->per_dir_config,
REMOTE_NAME);
- if ((dot = strchr(rname, '.')))
- *dot = '\0'; /* First bit of hostname */
-
#if defined(NO_GETTIMEOFDAY) && !defined(NO_TIMES)
/* We lack gettimeofday(), so we must use time() to obtain the epoch
seconds, and then times() to obtain CPU clock ticks (milliseconds).
@@ -151,7 +147,7 @@
mpe_times = times(&mpe_tms);
- ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s%d%ld%ld", rname, (int)
getpid(),
+ ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%d%ld%ld", rname, (int)
getpid(),
(long) r->request_time, (long) mpe_tms.tms_utime);
#elif defined(WIN32)
/*
@@ -160,13 +156,13 @@
* was started. It should be relatively unique.
*/
- ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s%d%ld%ld", rname, (int)
getpid(),
+ ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%d%ld%ld", rname, (int)
getpid(),
(long) r->request_time, (long) GetTickCount());
#else
gettimeofday(&tv, &tz);
- ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s%d%ld%d", rname, (int)
getpid(),
+ ap_snprintf(cookiebuf, sizeof(cookiebuf), "%s.%d%ld%d", rname, (int)
getpid(),
(long) tv.tv_sec, (int) tv.tv_usec / 1000);
#endif