preliminary ipv6 support - not tested
[svn/Prometheus-QoS/.git] / htmlandlogs.c
index 8bcfe71f2e36832e0633eae6ac79e895ab543a02..e11af1abac500b99e2b38d3489a4769a57e1455e 100644 (file)
@@ -191,14 +191,14 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview)
    {\r
      fprintf(f,"<span id=\"sharing_%d\" style=\"display:none\">",i);\r
      popup_button=0;\r
-     for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,':')) /* IPv4 only */\r
+     for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !sharedip->v6) /* IPv4 only */\r
      {\r
       fprintf(f,"<br /><a class=\"blue\" target=\"_blank\" href=\"%s%s.log\">%s</a>\n", log_url, sharedip->name, sharedip->name);\r
       popup_button++;\r
      }\r
-     for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,'.')) /* IPv6 only */\r
+     for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && sharedip->v6) /* IPv6 only */\r
      {\r
-      fprintf(f,"<br /><a class=\"blue\" target=\"_blank\" href=\"%s%s.log\">%s</a>\n", log_url, sharedip->name, sharedip->addr);\r
+      fprintf(f,"<br /><a class=\"blue\" target=\"_blank\" href=\"%s%s.log\">%s/64</a>\n", log_url, sharedip->addr, sharedip->addr);\r
       popup_button++;\r
      }\r
      fputs("</span>\n",f);\r
@@ -234,11 +234,11 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview)
    if(use_jquery_popups)\r
    {\r
      fprintf(f,"<span id=\"download_%d\" style=\"display:none\">",i);\r
-     for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,':')) /* IPv4 only */\r
+     for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !sharedip->v6) /* IPv4 only */\r
      {\r
       fprintf(f,"<br />%Lu", sharedip->direct);\r
      }\r
-     for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,'.')) /* IPv6 only */\r
+     for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && sharedip->v6) /* IPv6 only */\r
      {\r
       fprintf(f,"<br />%Lu", sharedip->direct);\r
      }\r
@@ -256,11 +256,11 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview)
    if(use_jquery_popups)\r
    {\r
      fprintf(f,"<span id=\"upload_%d\" style=\"display:none\">",i);\r
-     for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,':')) /* IPv4 only */\r
+     for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing) && !sharedip->v6) /* IPv4 only */\r
      {\r
       fprintf(f,"<br />%Lu", sharedip->upload);\r
      }\r
-     for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,'.')) /* IPv6 only */\r
+     for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing) && sharedip->v6) /* IPv6 only */\r
      {\r
       fprintf(f,"<br />%Lu", sharedip->upload);\r
      }\r
This page took 0.13492 seconds and 4 git commands to generate.