httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Mon, 27 Aug 2001 16:35:44 GMT
wrowe       01/08/27 09:35:44

  Modified:    server   core.c
  Log:
    Solve a bug I introduced this weekend, we want to compare core_*->r
    as a boolean, not by value.
  
    Reported by: Barrie Slaymaker <barries@slaysys.com>
  
  Revision  Changes    Path
  1.50      +7 -3      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- core.c	2001/08/26 17:38:14	1.49
  +++ core.c	2001/08/27 16:35:43	1.50
  @@ -395,12 +395,16 @@
       core_a = ap_get_module_config(a->elt, &core_module);
       core_b = ap_get_module_config(b->elt, &core_module);
   
  -    if (core_a->r < core_b->r) {
  +    /* a regex always sorts after a non-regex
  +     */
  +    if (!core_a->r && core_b->r) {
           return -1;
       }
  -    else if (core_a->r > core_b->r) {
  +    else if (core_a->r && !core_b->r) {
           return 1;
       }
  +    /* we always sort next by the number of components
  +     */
       if (core_a->d_components < core_b->d_components) {
           return -1;
       }
  @@ -408,7 +412,7 @@
           return 1;
       }
       /* They have the same number of components, we now have to compare
  -     * the minor key to maintain the original order. 
  +     * the minor key to maintain the original order (from the config.) 
        */
       return a->orig_index - b->orig_index;
   }
  
  
  

Mime
View raw message