"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/logformats/l_clf_native.c" between
free-sa-1.6.2.tar.gz and free-sa-2.0.0b6p7.tar.gz

About: Free-SA is a fast statistic analyzer for daemons log files (with SVG bar/pie graphics support). Beta version.

l_clf_native.c  (free-sa-1.6.2):l_clf_native.c  (free-sa-2.0.0b6p7)
#include "global.h" #include "global.h"
/* UNOPTIMIZED(?), NOT FINISHED */ /* UNOPTIMIZED(?), NOT FINISHED */
char CLFReadRecord(FILE *Log, time_t *ttime, double *tseconds, char *tip, short int *tcode, double *tbytes, char *tmethod, char *turl, char *tname, char *tstat) { char CLFReadRecord(FILE *Log, time_t *ttime, double *tseconds, char *tip, short int *tcode, double *tbytes, char *tmethod, char *turl, char *tname, char *tstat) {
char tdt[27], *thurl = turl, t = 0; char tdt[27], *thurl = turl, t = 0;
if (cfg.Site != NULL) { if (cfg.reports_site_name != NULL) {
strcpy(turl, cfg.Site); SAstrlcpy(turl, cfg.reports_site_name, URLSIZE);
thurl = turl + strlen(turl); thurl = turl + strlen(turl);
} }
if (fscanf(Log, "%" IPLEN "s - %" USERNAMELEN "s [%26[^]]%*c \"%c%*s %" URLL EN "s %*[^\"]%*c %3hd ", tip, tname, tdt, tmethod, thurl, tcode) != 6) return 0; if (fscanf(Log, "%" IPLEN "s - %" USERNAMELEN "s [%26[^]]%*c \"%c%*s %" URLL EN "s %*[^\"]%*c %3hd ", tip, tname, tdt, tmethod, thurl, tcode) != 6) return 0;
if (*tcode == 304) *tbytes = 0; if (*tcode == 304) *tbytes = 0;
else if (fscanf(Log, "%lf", tbytes) != 1) return 0; else if (fscanf(Log, "%lf", tbytes) != 1) return 0;
while(t != '\n') if (fread(&t, 1L, 1L, Log) == 0L) return 0; while(t != '\n') if (fread(&t, 1L, 1L, Log) == 0L) return 0;
*tstat = 0; *tstat = 0;
*tseconds = 0; *tseconds = 0;
CLFDTZ(ttime, tdt); if (!CLFDTZ(ttime, tdt)) return 0;
return 1; return 1;
} }
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS