long long int totelap=0, totelap2=0, nnelap=0, unelap=0, tnelap=0;
long long int incache=0, oucache=0, tnincache=0, tnoucache=0, twork=0;
long long int ltemp;
- long long int ntotuser;
+ long long int ntotuser=1;
long long int userbytes, userelap;
char *buf;
char arqin[MAXLEN], arqou[MAXLEN], arqper[MAXLEN], arqip[MAXLEN];
totbytes=globstat.nbytes;
totelap=globstat.elap;
- snprintf(arqper,sizeof(arqper),"%s/sarg-users",outdirname);
- if ((fp_in = fopen(arqper, "r")) == 0){
- debuga(_("(html11) Cannot open file %s\n"),arqper);
- exit(EXIT_FAILURE);
- }
- if (!fgets(totuser,sizeof(totuser),fp_in)) {
- debuga(_("(html11) read error in %s\n"),arqper);
- exit(EXIT_FAILURE);
+ if ((ReportType & REPORT_TYPE_TOPUSERS) != 0) {
+ snprintf(arqper,sizeof(arqper),"%s/sarg-users",outdirname);
+ if ((fp_in = fopen(arqper, "r")) == 0){
+ debuga(_("(html11) Cannot open file %s - %s\n"),arqper,strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ if (!fgets(totuser,sizeof(totuser),fp_in)) {
+ debuga(_("(html11) read error in %s\n"),arqper);
+ exit(EXIT_FAILURE);
+ }
+ fclose(fp_in);
+ ntotuser=my_atoll(totuser);
+ if (ntotuser<=0) ntotuser=1;
}
- fclose(fp_in);
- ntotuser=my_atoll(totuser);
- if (ntotuser<=0) ntotuser=1;
greport_prepare();