From: Frederic Marchal Date: Fri, 17 Jul 2015 19:34:17 +0000 (+0200) Subject: Limit the number of top users reported in the mail report X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f57ddb6349dc5f8c155f3cbeefd438336f1a20b;p=thirdparty%2Fsarg.git Limit the number of top users reported in the mail report The topuser_num parameter in sarg limits the number of users reported in the email report. Set it to zero to report every user as was done before. Thanks to Yakushev Evgeniy for reporting this limitation. --- diff --git a/email.c b/email.c index 565c68a..2a70dfe 100644 --- a/email.c +++ b/email.c @@ -193,7 +193,7 @@ int geramail(const char *dirname, int debug, const char *email, const char *Temp fprintf(fp_top3,"%-7s %-20s %-8s %-15s %%%-6s %-10s %-10s %%%-7s\n------- -------------------- -------- --------------- ------- ---------- ---------- -------\n",strip1,strip2,strip3,strip4,strip4,strip5,strip6,strip7); - while(fgets(warea,sizeof(warea),fp_top1)) { + while ((TopUsersNum==0 || posicao