cvs commit: apache-1.3/src/modules/standard mod_usertrack.c

1999-10-29 Thread coar
coar99/10/29 14:29:59

  Modified:src/modules/standard mod_usertrack.c
  Log:
More in the continuing saga of nitfixes from the Netware
update.  I *think* this does this trick, but I don't build
on either Windows or Netware.  At least mod_usertrack compiles
on Linux now..
  
  Revision  ChangesPath
  1.43  +4 -1  apache-1.3/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- mod_usertrack.c   1999/10/28 18:10:55 1.42
  +++ mod_usertrack.c   1999/10/29 21:29:53 1.43
  @@ -135,10 +135,13 @@
   #if defined(NO_GETTIMEOFDAY)  !defined(NO_TIMES)
   clock_t mpe_times;
   struct tms mpe_tms;
  -#elif !defined(WIN32)  !defined(NETWARE)
  +#elif !defined(WIN32)
   struct timeval tv;
  +#ifdef NETWARE
   time_t tz = 0;
  +#else
   struct timezone tz = {0, 0};
  +#endif /* defined(NETWARE) */
   #endif
   /* 1024 == hardcoded constant */
   char cookiebuf[1024];
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_usertrack.c

1999-10-28 Thread stoddard
stoddard99/10/28 11:10:59

  Modified:src/modules/standard mod_usertrack.c
  Log:
  Fix netware bug in original patch
  
  Revision  ChangesPath
  1.42  +1 -4  apache-1.3/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- mod_usertrack.c   1999/10/27 09:26:54 1.41
  +++ mod_usertrack.c   1999/10/28 18:10:55 1.42
  @@ -135,13 +135,10 @@
   #if defined(NO_GETTIMEOFDAY)  !defined(NO_TIMES)
   clock_t mpe_times;
   struct tms mpe_tms;
  -#elif !defined(WIN32) || defined(NETWARE)
  +#elif !defined(WIN32)  !defined(NETWARE)
   struct timeval tv;
  -#ifdef NETWARE
   time_t tz = 0;
  -#else
   struct timezone tz = {0, 0};
  -#endif
   #endif
   /* 1024 == hardcoded constant */
   char cookiebuf[1024];
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_usertrack.c

1998-06-08 Thread dgaudet
dgaudet 98/06/07 23:09:53

  Modified:src  CHANGES
   src/modules/standard mod_usertrack.c
  Log:
  don't hammer the hostname... it's a constant string... note I changed the
  cookie format to include the FQDN, I don't see why it doesn't include
  the FQDN.
  
  PR:   2366
  
  Revision  ChangesPath
  1.896 +4 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.895
  retrieving revision 1.896
  diff -u -r1.895 -r1.896
  --- CHANGES   1998/06/08 05:39:53 1.895
  +++ CHANGES   1998/06/08 06:09:51 1.896
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.1
   
  +  *) mod_usertrack was corrupting the client hostname.  As part of the
  + fix, the cookie values were slightly extended to include the
  + fully qualified hostname of the client.  [Dean Gaudet] PR#2366
  +
 *) Fix a typo in pool debugging code.  [Alvaro Martinez Echevarria]
   
 *) mod_unique_id did not work on alpha linux (in general on any
  
  
  
  1.35  +3 -7  apache-1.3/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- mod_usertrack.c   1998/04/11 12:00:53 1.34
  +++ mod_usertrack.c   1998/06/08 06:09:52 1.35
  @@ -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
   
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_usertrack.c

1998-03-04 Thread dgaudet
dgaudet 98/03/04 01:45:47

  Modified:src/include httpd.h
   src/main util.c
   src/modules/proxy proxy_util.c
   src/modules/standard mod_usertrack.c
  Log:
  As long as we're exporting month_snames we might as well make use of it.
  And if we're going to do that it seems silly not to export day_snames
  and make use of that.
  
  Revision  ChangesPath
  1.191 +1 -0  apache-1.3/src/include/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/httpd.h,v
  retrieving revision 1.190
  retrieving revision 1.191
  diff -u -r1.190 -r1.191
  --- httpd.h   1998/03/04 02:28:13 1.190
  +++ httpd.h   1998/03/04 09:45:35 1.191
  @@ -801,6 +801,7 @@
   
   /* Time */
   extern MODULE_VAR_EXPORT const char month_snames[12][4];
  +extern MODULE_VAR_EXPORT const char day_snames[7][4];
   
   API_EXPORT(struct tm *) get_gmtoff(int *tz);
   API_EXPORT(char *) get_time(void);
  
  
  
  1.96  +5 -3  apache-1.3/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- util.c1998/03/04 09:35:45 1.95
  +++ util.c1998/03/04 09:45:38 1.96
  @@ -79,6 +79,10 @@
   {
   Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, 
Nov, Dec
   };
  +const char day_snames[7][4] =
  +{
  +Sun, Mon, Tue, Wed, Thu, Fri, Sat
  +};
   
   API_EXPORT(char *) get_time()
   {
  @@ -106,8 +110,6 @@
   
   API_EXPORT(char *) gm_timestr_822(pool *p, time_t sec)
   {
  -static const char *const days[7] =
  -{Sun, Mon, Tue, Wed, Thu, Fri, Sat};
   char ts[50];
   struct tm *tms;
   
  @@ -115,7 +117,7 @@
   
   /* RFC date format; as strftime '%a, %d %b %Y %T GMT' */
   ap_snprintf(ts, sizeof(ts),
  - %s, %.2d %s %d %.2d:%.2d:%.2d GMT, days[tms-tm_wday],
  + %s, %.2d %s %d %.2d:%.2d:%.2d GMT, day_snames[tms-tm_wday],
tms-tm_mday, month_snames[tms-tm_mon], tms-tm_year + 1900,
tms-tm_hour, tms-tm_min, tms-tm_sec);
   
  
  
  
  1.48  +5 -10 apache-1.3/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- proxy_util.c  1998/03/02 06:51:16 1.47
  +++ proxy_util.c  1998/03/04 09:45:42 1.48
  @@ -275,13 +275,8 @@
   return NULL;
   }
   
  -static const char *lwday[7] =
  +static const char * const lwday[7] =
   {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, 
Saturday};
  -static const char *wday[7] =
  -{Sun, Mon, Tue, Wed, Thu, Fri, Sat};
  -static const char *months[12] =
  -{Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov,
  - Dec};
   
   /*
* If the date is a valid RFC 850 date or asctime() date, then it
  @@ -326,7 +321,7 @@
   min, sec, year) != 7)
return x;
for (wk = 0; wk  7; wk++)
  - if (strcmp(week, wday[wk]) == 0)
  + if (strcmp(week, day_snames[wk]) == 0)
break;
if (wk == 7)
return x;
  @@ -334,15 +329,15 @@
   
   /* check date */
   for (mon = 0; mon  12; mon++)
  - if (strcmp(month, months[mon]) == 0)
  + if (strcmp(month, month_snames[mon]) == 0)
break;
   if (mon == 12)
return x;
   
   if (strlen(x)  30)
x = palloc(p, 30);
  -ap_snprintf(x, 30, %s, %.2d %s %d %.2d:%.2d:%.2d GMT, wday[wk], mday,
  - months[mon], year, hour, min, sec);
  +ap_snprintf(x, 30, %s, %.2d %s %d %.2d:%.2d:%.2d GMT, day_snames[wk], 
mday,
  + month_snames[mon], year, hour, min, sec);
   return x;
   }
   
  
  
  
  1.26  +2 -8  apache-1.3/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mod_usertrack.c   1998/01/26 19:50:26 1.25
  +++ mod_usertrack.c   1998/03/04 09:45:46 1.26
  @@ -109,10 +109,6 @@
   time_t expires;
   }  cookie_log_state;
   
  -static const char month_names[12][4] = {
  -Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, 
Nov, Dec
  -};
  -
   /* Define this to allow post-2000 cookies. Cookies use two-digit dates,
* so it might be dicey. (Netscape does it correctly, but others may not)
*/
  @@ -172,8 +168,6 @@
   #endif
   
   if (cls-expires) {
  -static const char *const days[7] =
  -{Sun, Mon, Tue, Wed, Thu, Fri, Sat};
   struct tm *tms;