Bug 81117 - net-mgmt/mrtg major bugfix -- rateup generates broken graphs
Summary: net-mgmt/mrtg major bugfix -- rateup generates broken graphs
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Sivachenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-16 19:00 UTC by Jeremy Chadwick
Modified: 2005-05-17 07:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Chadwick 2005-05-16 19:00:20 UTC
	mrtg 2.12.0 contains broken rateup code, and also generates improper CSS,
	plus does not "decently" support setups where XSize/YSize are used in
	mrtg.cfg (the newly-added CSS hard-codes width/height of 500x135, rather
	than letting the browser figure it out).

	In the meantime, below is the patch for rateup.c which fixes the
	problem of graphs being drawn as if "Unscaled" was set.  The other few
	bugs will have to wait, as they're cosmetic, although the XSize/YSize
	one is quite annoying...

	All of these problems will be addressed in 2.12.1 says Tobias, as I've
	been in Email contact with him quite a lot this morning about such
	problems.

Fix: Add this patch to files/, naturally.  This comes from Tobias, BTW.




/* multiplicator for bits/bytes */
+  maxv = (long long) max (maxvi, maxvo);
   maxvi = maxvi < (long long) 0 ? -maxvi : maxvi;
   maxvo = maxvo < (long long) 0 ? -maxvo : maxvo;
   origmaxvi = maxvi;
@@ -328,7 +329,6 @@
       maxvi *= muli;
       maxvo *= muli;
     }
-  maxv = (long long) max (maxvi, maxvo);
   if (step > MONTH_SAMPLE)
     {
       type = 4;--TGaA5Ak1c1lXGFNFAX9Q2sjBxaHH9Z5Oc4wIwa4Lj33ZbO8v
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- src/rateup.c~   2005-05-16 19:15:06.468444000 +0200
+++ src/rateup.c    2005-05-16 19:15:09.138421000 +0200
@@ -318,6 +318,7 @@
     }
How-To-Repeat: 	Generate some graphs and see what I mean.  :-)
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2005-05-16 19:08:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->demon

Over to maintainer
Comment 2 Dmitry Sivachenko freebsd_committer freebsd_triage 2005-05-17 07:33:48 UTC
State Changed
From-To: open->closed

Patch committed, thanks!