]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Remove old commented out code
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 3 Jul 2012 14:40:15 +0000 (16:40 +0200)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 3 Jul 2012 14:40:15 +0000 (16:40 +0200)
Those lines of code had been kept around for information.

readlog.c

index 99015d8d16b470b72a198d32b603b47ba715ea83..baef44dce9bc9ff23552b377707d817e53ccdf62 100644 (file)
--- a/readlog.c
+++ b/readlog.c
@@ -678,31 +678,6 @@ int ReadLogFile(struct ReadLogDataStruct *Filter)
                        if(testvaliduserchar(user))
                                continue;
 
-       #if 0
-                       if((str = strstr(user,"%20")) != NULL) {
-                               /*
-                               This is a patch introduced to solve bug #1624251 reported at sourceforge but
-                               the side effect is to truncate the name at the first space and merge the reports
-                               of people whose name is identical up to the first space.
-
-                               The old code used to truncate the user name at the first % if a %20 was
-                               found anywhere in the string. That means the string could be truncated
-                               at the wrong place if another % occured before the %20. This new code should
-                               avoid that problem and only truncate at the space. There is no bug
-                               report indicating that anybody noticed this.
-                               */
-                               *str='\0';
-                       }
-
-                       /*
-                       Code prior to 2.2.7 used to replace any %xx by a dot as long as a %5c was
-                       found in the user name.
-                       */
-                       while((str = strstr(user,"%5c")) != NULL) {
-                               *str='.';
-                               for (x=3 ; str[x] ; x++) str[x-2]=str[x];
-                       }
-       #endif
                        // replace any tab by a single space
                        for (str=full_url ; *str ; str++)
                                if (*str=='\t') *str=' ';
@@ -868,17 +843,6 @@ int ReadLogFile(struct ReadLogDataStruct *Filter)
                        strftime(dia, sizeof(dia), "%d/%m/%Y", log_entry.EntryTime);
                        strftime(hora,sizeof(hora),"%H:%M:%S",log_entry.EntryTime);
 
-                       /*if ( strcmp ( user , sz_Last_User ) != 0 ) {
-                               if ( fp_Write_User )
-                                       fclose( fp_Write_User ) ;
-                               sprintf (tmp3, "%s/%s.unsort", tmp, user);
-
-                               if ((fp_Write_User = MY_FOPEN (tmp3, "a")) == NULL) {
-                                       fprintf (stderr, "%s: (log) %s: %s - %s\n", argv[0], _("Cannot open temporary file"), tmp3, strerror(errno));
-                                       exit (1);
-                               }
-                               strcpy( sz_Last_User , user ) ;
-                       }*/
                        if (fprintf(ufile->file, "%s\t%s\t%s\t%s\t%ld\t%s\t%ld\t%s\n",dia,hora,log_entry.Ip,url,nbytes,code,elap_time,smartfilter)<=0) {
                                debuga(_("Write error in the log file of user %s\n"),user);
                                exit(EXIT_FAILURE);