X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=prometheus.c;h=094008789cd56e3029e1e57641805463d2fb09bd;hp=780b15858c8dadec585d28a63b31ffe8c0350205;hb=3bf40f9b7d9850a43a3a53374dac3cde20adf587;hpb=0db8e99319ee2e9798ba7fb58a7666791cf81414
diff --git a/prometheus.c b/prometheus.c
index 780b158..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;
}
}