X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=prometheus.c;h=094008789cd56e3029e1e57641805463d2fb09bd;hp=2eda2592210dfd88b0e774a7e32278ea6dcde8c3;hb=3bf40f9b7d9850a43a3a53374dac3cde20adf587;hpb=e48d46c959233c89ccd6ccd411b31704610abb71 diff --git a/prometheus.c b/prometheus.c index 2eda259..0940087 100644 --- a/prometheus.c +++ b/prometheus.c @@ -2,12 +2,12 @@ /* Prometheus QoS - you can "steal fire" from your ISP */ /* "fair-per-IP" quality of service (QoS) utility */ /* requires Linux 2.4.x or 2.6.x with HTB support */ -/* Copyright(C) 2005-2012 Michael Polak, Arachne Labs */ +/* Copyright(C) 2005-2013 Michael Polak, Arachne Labs */ /* iptables-restore support Copyright(C) 2007-2008 ludva */ /* Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -/* Modified by: xChaos, 20121011 +/* Modified by: xChaos, 20130107 ludva, 20080415 Prometheus QoS is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ const char *version = "0.8.3-g"; /* C source code development versions ("beta"): 0.7.9-a, 0.8.1-b, etc. */ /* C source code release versions: 0.8.0, 0.8.2, 0.8.4, etc. */ -const char *stats_html_signature = "Statistics generated by Prometheus QoS version %s
GPL+Copyright(C)2005-2012 Michael Polak, Arachne Labs
\n"; +const char *stats_html_signature = "Statistics generated by Prometheus QoS version %s
GPL+Copyright(C)2005-2013 Michael Polak, Arachne Labs
\n"; /* ======= Help screen is hopefuly self-documenting part of code :-) ======= */ @@ -232,7 +232,10 @@ void get_config(char *config_filename) keyword->leaf_discipline=""; push(keyword,keywords); - if(!defaultkeyword) defaultkeyword=keyword; + if(!defaultkeyword) + { + defaultkeyword=keyword; + } keywordcount++; kwd=NULL; @@ -463,12 +466,16 @@ void get_traffic_statistics(void) else { TheIP(); - ip->addr=ipaddr; + ip->addr = ipaddr; if(eq(ip->addr,"0.0.0.0/0")) { - ip->name="(unregistered)"; - ip->min=free_min; - ip->max=ip->desired=free_max; + ip->name = "(unregistered)"; + ip->min = free_min; + ip->max = ip->desired=free_max; + } + else + { + ip->name = ipaddr; } } @@ -1086,7 +1093,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); /*-----------------------------------------------------------------*/ printf("Writing statistics into HTML page %s ...\n", html); /*-----------------------------------------------------------------*/ - write_htmlandlogs(json_traffic,d,total, just_preview); + write_htmlandlogs(html, d,total, just_preview); if(just_preview) {