cvs commit: apachen/src/modules/standard mod_unique_id.c

1997-12-15 Thread marc
marc97/12/15 14:35:35

  Modified:src/modules/standard mod_unique_id.c
  Log:
  Remove netdb.h include; already included from conf.h
  
  Reviewed by:  Dirk-Willem van Gulik, Roy T. Fielding
  
  Revision  ChangesPath
  1.8   +0 -1  apachen/src/modules/standard/mod_unique_id.c
  
  Index: mod_unique_id.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_unique_id.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- mod_unique_id.c   1997/10/24 08:56:46 1.7
  +++ mod_unique_id.c   1997/12/15 22:35:34 1.8
  @@ -62,7 +62,6 @@
   #include http_log.h
   #include multithread.h
   #include unistd.h
  -#include netdb.h
   
   #ifdef MULTITHREAD
   #error sorry this module does not support multithreaded servers yet
  
  
  


cvs commit: apachen/src/modules/standard mod_unique_id.c

1997-10-24 Thread dgaudet
dgaudet 97/10/24 01:56:48

  Modified:src/modules/standard mod_unique_id.c
  Log:
  I'm in the middle of documenting the algorithm used here... I found another
  problem to defend against.
  
  Revision  ChangesPath
  1.7   +4 -1  apachen/src/modules/standard/mod_unique_id.c
  
  Index: mod_unique_id.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_unique_id.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_unique_id.c   1997/10/22 20:30:30 1.6
  +++ mod_unique_id.c   1997/10/24 08:56:46 1.7
  @@ -245,7 +245,10 @@
   cur_unique_id.counter = 0;
   }
   else {
  -cur_unique_id.counter = tv.tv_usec;
  + /* Some systems have very low variance on the low end of their
  +  * system counter, defend against that.
  +  */
  +cur_unique_id.counter = tv.tv_usec / 10;
   }
   #else
   cur_unique_id.counter = 0;
  
  
  


cvs commit: apachen/src/modules/standard mod_unique_id.c

1997-09-15 Thread Dean Gaudet
dgaudet 97/09/15 21:49:51

  Modified:src/modules/standard mod_unique_id.c
  Log:
  Fix the accuracy of some comments.  Raise the logging level of a bad error
  to CRIT.  This is a case where I need the filename logged ... but with
  the new format I either include it myself and have it logged twice for
  some people, or don't include it and have it not logged for other people.
  Lose lose.
  
  Revision  ChangesPath
  1.4   +8 -8  apachen/src/modules/standard/mod_unique_id.c
  
  Index: mod_unique_id.c
  ===
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_unique_id.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_unique_id.c   1997/09/16 04:30:22 1.3
  +++ mod_unique_id.c   1997/09/16 04:49:50 1.4
  @@ -51,7 +51,7 @@
*/
   
   /*
  - * mod_uniqueid.c: generate a unique identifier for each request
  + * mod_unique_id.c: generate a unique identifier for each request
*
* Original author: Dean Gaudet [EMAIL PROTECTED]
*/
  @@ -215,21 +215,21 @@
* it's guaranteed that none of them will share the same pids between
* children.
* 
  - * XXX: for multithread this needs to use a pid/tid combo and probably 
XXX:
  + * XXX: for multithread this needs to use a pid/tid combo and probably
* needs to be expanded to 32 bits
*/
   pid = getpid();
   cur_unique_id.pid = pid;
   
   /*
  - * Test our assumption that the pid is 16-bits.  But note we can't just
  - * test sizeof (pid_t) because on some machines pid_t is 32-bits but pids
  - * are actually only 16-bits.  It would have been really nice to test
  - * this during global_init ... but oh well.
  + * Test our assumption that the pid is 32-bits.  It's possible that
  + * 64-bit machines will declare pid_t to be 64 bits but only use 32
  + * of them.  It would have been really nice to test this during
  + * global_init ... but oh well.
*/
   if (cur_unique_id.pid != pid) {
  -aplog_error(APLOG_MARK, APLOG_DEBUG, s,
  -oh no! pids are greater than 16-bits!  I'm broken!);
  +aplog_error(APLOG_MARK, APLOG_CRIT, s,
  +oh no! pids are greater than 32-bits!  I'm broken!);
   }
   
   cur_unique_id.in_addr = global_in_addr;