Copy to master from devel - ready for 0.8

This commit is contained in:
z3APA3A committed 2016-01-13 00:20:50 +03:00
1 parent db169c48c3
commit 5287278fa5
74 files changed
+5163 -4637

No files matched your search

+10 -17
View File
@@ -4,7 +4,6 @@
please read License Agreement
$Id: webadmin.c,v 1.44 2014-04-07 20:35:12 vlad Exp $
*/
#include "proxy.h"
@@ -319,21 +318,15 @@ static int printuserlist(char *buf, int bufsize, struct userlist* ul, char * del
return printed;
}
int printiple(char *buf, struct iplist* ipl);
static int printiplist(char *buf, int bufsize, struct iplist* ipl, char * delim){
int printed = 0;
for(; ipl; ipl = ipl->next){
if(printed > (bufsize - 64)) break;
printed += sprintf(buf+printed, "%u.%u.%u.%u mask %u.%u.%u.%u%s",
(unsigned)(ntohl(ipl->ip)&0xff000000)>>24,
(unsigned)(ntohl(ipl->ip)&0x00ff0000)>>16,
(unsigned)(ntohl(ipl->ip)&0x0000ff00)>>8,
(unsigned)(ntohl(ipl->ip)&0x000000ff),
(unsigned)(ntohl(ipl->mask)&0xff000000)>>24,
(unsigned)(ntohl(ipl->mask)&0x00ff0000)>>16,
(unsigned)(ntohl(ipl->mask)&0x0000ff00)>>8,
(unsigned)(ntohl(ipl->mask)&0x000000ff),
ipl->next?delim:"");
if(printed > (bufsize - 64)) {
if(printed > (bufsize - 128)) break;
printed += printiple(buf+printed, ipl);
if(printed > (bufsize - 128)) {
printed += sprintf(buf+printed, "...");
break;
}
@@ -476,13 +469,13 @@ void * adminchild(struct clientparam* param) {
}
else {
inbuf += sprintf(buf+inbuf,
"</td><td>%.3f</td>"
"</td><td>%"PRINTF_INT64_MODIFIER"u</td>"
"<td>MB%s</td>"
"<td>%.3f MB</td>"
"<td>%"PRINTF_INT64_MODIFIER"u</td>"
"<td>%s</td>",
(4 * 1024.0 * (float)cp->traflimgb) + (float)cp->traflim/(1024.*1024.),
cp->traflim64,
rotations[cp->type],
(4 * 1024.0 * (float)cp->trafgb) + (float)cp->traf/(1024.*1024.),
cp->traf64,
cp->cleared?ctime(&cp->cleared):"never"
);
inbuf += sprintf(buf + inbuf,