[rrd-users] Re: rrdcgi bug ?

steve rader rader at teak.wiscnet.net
Wed Nov 3 04:28:36 MET 1999


 > From: steve rader
 > You're on the right track!  Imagine that.  =:)  I found that
 > the following patch makes <RRD::PRINT 1> work for me:

Oops.  I'm not seeing too clearly tonight; the correct patch
is enclosed.  Thanks Tobi.

later
steve
- - -
systems guy
wiscnet.net



-- Attached file included as plaintext by Listar --
-- Desc: RRD::PRINT patch

--- rrd_cgi.c.orig      Fri Aug 27 14:20:05 1999
+++ rrd_cgi.c   Tue Nov  2 21:24:38 1999
@@ -332,11 +332,11 @@
 }
 
 char* drawprint(long argc, char **args){
-  if (argc>=1 && calcpr != NULL){
+  if (argc==1 && calcpr){
     long i=0;
     while (calcpr[i] != NULL) i++; /*determine number lines in calcpr*/
     if (atol(args[0])<i-1)
-      return calcpr[atol(args[0])+1];    
+      return stralloc(calcpr[atol(args[0])+1]);    
   }
   return stralloc("[ERROR: RRD::PRINT argument error]");
 }


--
* To unsubscribe from the rrd-users mailing list, send a message with the
  subject: unsubscribe to rrd-users-request at list.ee.ethz.ch



More information about the rrd-users mailing list