components/webalizer/patches/webalizer-2.01-10-groupvisit.patch
changeset 1130 a4adf8cbfa5d
child 5595 7019066a05e3
equal deleted inserted replaced
1129:4de26d59569c 1130:a4adf8cbfa5d
       
     1 --- webalizer-2.01-10/hashtab.c.groupvisit	2001-06-15 11:34:24.000000000 +0300
       
     2 +++ webalizer-2.01-10/hashtab.c	2006-03-30 12:52:30.000000000 +0300
       
     3 @@ -94,6 +94,8 @@
       
     4  DNODEPTR host_table[MAXHASH];                 /* DNS hash table           */
       
     5  #endif  /* USE_DNS */
       
     6  
       
     7 +u_long   pre_tstamp = 0;                      /* prev. real record tstamp */
       
     8 +
       
     9  
       
    10  /*********************************************/
       
    11  /* DEL_HTABS - clear out our hash tables     */
       
    12 @@ -184,6 +186,7 @@
       
    13              nptr->visit=(visit-1);
       
    14              nptr->lasturl=find_url(lasturl);
       
    15              nptr->tstamp=tstamp;
       
    16 +            if ((type!=OBJ_GRP)&&(nptr->flag!=OBJ_GRP)) pre_tstamp=nptr->tstamp;
       
    17              return 0;
       
    18           }
       
    19           else
       
    20 @@ -193,6 +196,7 @@
       
    21                 if (htab==sm_htab) update_entry(log_rec.url);
       
    22                 nptr->lasturl=find_url(log_rec.url);
       
    23                 nptr->tstamp=tstamp;
       
    24 +               if ((type!=OBJ_GRP)&&(nptr->flag!=OBJ_GRP)) pre_tstamp=nptr->tstamp;
       
    25                 nptr->visit=1;
       
    26              }
       
    27           }
       
    28 @@ -214,7 +218,8 @@
       
    29  
       
    30                 if (ispage(log_rec.url))
       
    31                 {
       
    32 -                  if ((tstamp-cptr->tstamp)>=visit_timeout)
       
    33 +                  if ((type!=OBJ_GRP)&&(cptr->flag!=OBJ_GRP)) pre_tstamp=cptr->tstamp;
       
    34 +                  if ((tstamp-pre_tstamp)>=visit_timeout)
       
    35                    {
       
    36                       cptr->visit++;
       
    37                       if (htab==sm_htab)
       
    38 @@ -247,6 +252,7 @@
       
    39              nptr->visit = (visit-1);
       
    40              nptr->lasturl=find_url(lasturl);
       
    41              nptr->tstamp= tstamp;
       
    42 +            if ((type!=OBJ_GRP)&&(nptr->flag!=OBJ_GRP)) pre_tstamp=nptr->tstamp;
       
    43              return 0;
       
    44           }
       
    45           else
       
    46 @@ -256,6 +262,7 @@
       
    47                 if (htab==sm_htab) update_entry(log_rec.url);
       
    48                 nptr->lasturl=find_url(log_rec.url);
       
    49                 nptr->tstamp= tstamp;
       
    50 +               if ((type!=OBJ_GRP)&&(nptr->flag!=OBJ_GRP)) pre_tstamp=nptr->tstamp;
       
    51                 nptr->visit=1;
       
    52              }
       
    53           }
       
    54 @@ -840,11 +847,16 @@
       
    55           {
       
    56              nptr->visit=(visit-1);
       
    57              nptr->tstamp=tstamp;
       
    58 +            if ((type!=OBJ_GRP)&&(nptr->flag!=OBJ_GRP)) pre_tstamp=nptr->tstamp;
       
    59              return 0;
       
    60           }
       
    61           else
       
    62           {
       
    63 -            if (ispage(log_rec.url)) nptr->tstamp=tstamp;
       
    64 +            if (ispage(log_rec.url)) 
       
    65 +            {
       
    66 +               nptr->tstamp=tstamp;
       
    67 +               if ((type!=OBJ_GRP)&&(nptr->flag!=OBJ_GRP)) pre_tstamp=nptr->tstamp;
       
    68 +            }
       
    69           }
       
    70        }
       
    71     }
       
    72 @@ -864,7 +876,8 @@
       
    73  
       
    74                 if (ispage(log_rec.url))
       
    75                 {
       
    76 -                  if ((tstamp-cptr->tstamp)>=visit_timeout)
       
    77 +                  if ((type!=OBJ_GRP)&&(cptr->flag!=OBJ_GRP)) pre_tstamp=cptr->tstamp;
       
    78 +                  if ((tstamp-pre_tstamp)>=visit_timeout)
       
    79                       cptr->visit++;
       
    80                    cptr->tstamp=tstamp;
       
    81                 }
       
    82 @@ -888,11 +901,16 @@
       
    83           {
       
    84              nptr->visit = (visit-1);
       
    85              nptr->tstamp= tstamp;
       
    86 +            if ((type!=OBJ_GRP)&&(nptr->flag!=OBJ_GRP)) pre_tstamp=nptr->tstamp;
       
    87              return 0;
       
    88           }
       
    89           else
       
    90           {
       
    91 -            if (ispage(log_rec.url)) nptr->tstamp= tstamp;
       
    92 +            if (ispage(log_rec.url))
       
    93 +            {
       
    94 +               nptr->tstamp= tstamp;
       
    95 +               if ((type!=OBJ_GRP)&&(nptr->flag!=OBJ_GRP)) pre_tstamp=nptr->tstamp;
       
    96 +            }
       
    97           }
       
    98        }
       
    99     }