From: Frédéric Marchal Date: Tue, 3 Jul 2012 14:40:15 +0000 (+0200) Subject: Remove old commented out code X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64b43d74a475b2b40413b648124964df654d5e0e;p=thirdparty%2Fsarg.git Remove old commented out code Those lines of code had been kept around for information. --- diff --git a/readlog.c b/readlog.c index 99015d8..baef44d 100644 --- 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);