Loading ...
Sorry, an error occurred while loading the content.

Re: GroupUrls are mutually exclusive?

Expand Messages
  • Josef Meile
    Finally I decided to make my own patch. I posted it here for the interested people (See the bottom of the message). I m aware that it could slow down the
    Message 1 of 3 , Jul 6, 2004
    • 0 Attachment
      Finally I decided to make my own patch. I posted it here for the
      interested people (See the bottom of the message).

      I'm aware that it could slow down the excecution of webalizer if one
      has a lot of grouped URLs, but I can wait a little bit. Keep in mind
      that I haven't tested it very much and it's just a quick solution to
      my problem. I think also that it could be applied to other Groups (ie:
      GroupSite). You only have to do some small modifications.

      If I were familiar with the code, I would perhaps add a swich to the
      config file, let's say GroupURLScan, which could be either "no", then
      it would only match the first occurence and exit or "yes", then it
      will scan all the groups. By default I would say "no".

      Regards,
      Josef

      --->Begin patch file
      diff -bur webalizer-2.01-10/linklist.c
      webalizer-2.01-10-patched/linklist.c
      --- webalizer-2.01-10/linklist.c Fri Jun 15 10:34:24 2001
      +++ webalizer-2.01-10-patched/linklist.c Tue Jul 6 21:40:26 2004
      @@ -271,6 +271,26 @@
      }

      /*********************************************/
      +/* ISINGLIST - Test if string is in list */
      +/* and returns all matches */
      +/* Patched version of Josef Meile */
      +/*********************************************/
      +NLISTPTR isinglist2(GLISTPTR list, char *str)
      +{
      + GLISTPTR lptr;
      + NLISTPTR lptr2=NULL;
      +
      + lptr=list;
      + while (lptr!=NULL)
      + {
      + if (isinstr(str,lptr->string)) add_nlist(lptr->name,&lptr2);
      + lptr=lptr->next;
      + }
      + return lptr2;
      +}
      +
      +
      +/*********************************************/
      /* ISINSTR - Scan for string in string */
      /*********************************************/

      diff -bur webalizer-2.01-10/linklist.h
      webalizer-2.01-10-patched/linklist.h
      --- webalizer-2.01-10/linklist.h Fri Sep 29 05:50:30 2000
      +++ webalizer-2.01-10-patched/linklist.h Tue Jul 6 21:27:10 2004
      @@ -42,6 +42,7 @@

      extern char *isinlist(NLISTPTR, char *); /* scan list for
      str */
      extern char *isinglist(GLISTPTR, char *); /* scan glist for
      str */
      +extern NLISTPTR isinglist2(GLISTPTR, char *); /* patched from
      Josef Meile */
      extern int add_nlist(char *, NLISTPTR *); /* add list item
      */
      extern int add_glist(char *, GLISTPTR *); /* add group list
      item */
      --->End patch file
    Your message has been successfully submitted and would be delivered to recipients shortly.