/*
* SARG Squid Analysis Report Generator http://sarg.sourceforge.net
- * 1998, 2013
+ * 1998, 2015
*
* SARG donations:
* please look at http://sarg.sourceforge.net/donations.php
order="-r";
if (snprintf(arqin,sizeof(arqin),"%s/%s.utmp",tmp,uinfo->filename)>=sizeof(arqin)) {
- debuga(_("Path too long: "));
+ debuga(__FILE__,__LINE__,_("Path too long: "));
debuga_more("%s/%s.utmp\n",tmp,uinfo->filename);
exit(EXIT_FAILURE);
}
if (snprintf(arqou,sizeof(arqou),"%s/htmlrel.txt",tmp)>=sizeof(arqou)) {
- debuga(_("Path too long: "));
+ debuga(__FILE__,__LINE__,_("Path too long: "));
debuga_more("%s/htmlrel.txt\n",tmp);
exit(EXIT_FAILURE);
}
if(debug) {
- debuga(_("Sorting file: %s\n"),arqin);
+ debuga(__FILE__,__LINE__,_("Sorting file \"%s\"\n"),arqin);
}
if (snprintf(csort,sizeof(csort),"sort -n -T \"%s\" -t \"\t\" %s -k %s -k %s -k %s -o \"%s\" \"%s\"",tmp,order,field1,field2,field3,arqou,arqin)>=sizeof(csort)) {
- debuga(_("Sort command too long when sorting file \"%s\" to \"%s\"\n"),arqin,arqou);
+ debuga(__FILE__,__LINE__,_("Sort command too long when sorting file \"%s\" to \"%s\"\n"),arqin,arqou);
exit(EXIT_FAILURE);
}
cstatus=system(csort);
if (!WIFEXITED(cstatus) || WEXITSTATUS(cstatus)) {
- debuga(_("sort command return status %d\n"),WEXITSTATUS(cstatus));
- debuga(_("sort command: %s\n"),csort);
+ debuga(__FILE__,__LINE__,_("sort command return status %d\n"),WEXITSTATUS(cstatus));
+ debuga(__FILE__,__LINE__,_("sort command: %s\n"),csort);
exit(EXIT_FAILURE);
}
if (!KeepTempLog && unlink(arqin)) {
- debuga(_("Cannot delete \"%s\": %s\n"),arqin,strerror(errno));
+ debuga(__FILE__,__LINE__,_("Cannot delete \"%s\": %s\n"),arqin,strerror(errno));
exit(EXIT_FAILURE);
}
int clen;
if(debug) {
- debuga(_("Sorting log %s/%s.user_unsort\n"),tmp,uinfo->filename);
+ snprintf(csort,sizeof(csort),"%s/%s.user_unsort",tmp,uinfo->filename);
+ debuga(__FILE__,__LINE__,_("Sorting file \"%s\"\n"),csort);
}
user=uinfo->filename;
tmp, tmp, user, tmp, user);
if (clen>=sizeof(csort)) {
/* TRANSLATORS: The message is followed by the command that is too long. */
- debuga(_("User name too long to sort with command "));
+ debuga(__FILE__,__LINE__,_("User name too long to sort with command "));
debuga_more("sort -T \"%s\" -t \"\t\" -k 4,4 -k 1,1 -k 2,2 -o \"%s/%s.user_log\" \"%s/%s.user_unsort\"",
tmp, tmp, user, tmp, user);
exit(EXIT_FAILURE);
}
cstatus=system(csort);
if (!WIFEXITED(cstatus) || WEXITSTATUS(cstatus)) {
- debuga(_("sort command return status %d\n"),WEXITSTATUS(cstatus));
- debuga(_("sort command: %s\n"),csort);
+ debuga(__FILE__,__LINE__,_("sort command return status %d\n"),WEXITSTATUS(cstatus));
+ debuga(__FILE__,__LINE__,_("sort command: %s\n"),csort);
exit(EXIT_FAILURE);
}
if (snprintf(csort,sizeof(csort),"%s/%s.user_unsort",tmp,user)>=sizeof(csort)) {
- debuga(_("User name too long to manufacture file name "));
+ debuga(__FILE__,__LINE__,_("User name too long to manufacture file name "));
debuga_more("%s/%s.user_unsort\n",tmp,user);
exit(EXIT_FAILURE);
}
if (!KeepTempLog && unlink(csort)) {
- debuga(_("Cannot delete \"%s\": %s\n"),csort,strerror(errno));
+ debuga(__FILE__,__LINE__,_("Cannot delete \"%s\": %s\n"),csort,strerror(errno));
exit(EXIT_FAILURE);
}