1 --- bandwidthd-2.0.1/graph.c.orig 2008-05-09 10:37:51.000000000 -0500
2 +++ bandwidthd-2.0.1/graph.c 2008-05-09 10:37:55.000000000 -0500
7 - char filename[] = "./htdocs/index2.html";
8 + char filename[] = "/tmp/bandwidthd/index2.html";
14 if (config.tag == '1')
16 - if ((file = fopen("./htdocs/index.html", "wt")) == NULL)
17 + if ((file = fopen("/tmp/bandwidthd/index.html", "wt")) == NULL)
19 - syslog(LOG_ERR, "Failed to open ./htdocs/index.html");
20 + syslog(LOG_ERR, "Failed to open /tmp/bandwidthd/index.html");
25 for (SubnetCounter = 0; SubnetCounter < SubnetCount; SubnetCounter++)
27 HostIp2CharIp(SubnetTable[SubnetCounter].ip, Buffer1);
28 - sprintf(Buffer2, "./htdocs/Subnet-%c-%s.html", config.tag, Buffer1);
29 + sprintf(Buffer2, "/tmp/bandwidthd/Subnet-%c-%s.html", config.tag, Buffer1);
30 file = fopen(Buffer2, "wt");
31 fprintf(file, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
32 fprintf(file, "<HTML>\n<HEAD><TITLE>Bandwidthd - Subnet %s</TITLE>\n", Buffer1);
34 PrepareXAxis(im2, timestamp);
35 PrepareYAxis(im2, YMax);
37 - sprintf(outputfilename, "./htdocs/%s-%c-S.png", CharIp, config.tag);
38 + sprintf(outputfilename, "/tmp/bandwidthd/%s-%c-S.png", CharIp, config.tag);
39 OutputFile = fopen(outputfilename, "wb");
40 gdImagePng(im, OutputFile);
43 - sprintf(outputfilename, "./htdocs/%s-%c-R.png", CharIp, config.tag);
44 + sprintf(outputfilename, "/tmp/bandwidthd/%s-%c-R.png", CharIp, config.tag);
45 OutputFile = fopen(outputfilename, "wb");
46 gdImagePng(im2, OutputFile);
51 // The graph isn't worth clutering up the web pages with
52 - sprintf(outputfilename, "./htdocs/%s-%c-R.png", CharIp, config.tag);
53 + sprintf(outputfilename, "/tmp/bandwidthd/%s-%c-R.png", CharIp, config.tag);
54 unlink(outputfilename);
55 - sprintf(outputfilename, "./htdocs/%s-%c-S.png", CharIp, config.tag);
56 + sprintf(outputfilename, "/tmp/bandwidthd/%s-%c-S.png", CharIp, config.tag);
57 unlink(outputfilename);
60 --- bandwidthd-2.0.1/bandwidthd.c.orig 2008-05-09 10:06:37.000000000 -0500
61 +++ bandwidthd-2.0.1/bandwidthd.c 2008-05-09 10:38:55.000000000 -0500
66 - bd_CollectingData("htdocs/index.html");
67 - bd_CollectingData("htdocs/index2.html");
68 - bd_CollectingData("htdocs/index3.html");
69 - bd_CollectingData("htdocs/index4.html");
70 + bd_CollectingData("/tmp/bandwidthd/index.html");
71 + bd_CollectingData("/tmp/bandwidthd/index2.html");
72 + bd_CollectingData("/tmp/bandwidthd/index3.html");
73 + bd_CollectingData("/tmp/bandwidthd/index4.html");
76 /* detach from console. */