[rrd-users] Re: rrdcgi bug ?

Tobias Oetiker oetiker at ee.ethz.ch
Wed Nov 3 07:51:25 MET 1999


Yesterday you sent me mail regarding Re: [rrd-users] rrdcgi bug ? :

*>  > *> using <RRD::PRINT 1> seems to fail. See posts of Steve Rader and me
*>  > *> on rrd-users.
*>  > *> 
*>  > *> Steve, are you able to confirm the version?
*> 
*> 'tis 1.0.7
*>   
*>  > From: Tobias Oetiker
*>  > I think I found the problem ...
*>  > 
*>  > drawprint should look like this 
*>  > 
*>  > char* drawprint(long argc, char **args){
*>  >   if (argc==1 && calcpr){
*>  >     long i=0;
*>  >     while (calcpr[i] != NULL) i++; /*determine number lines in calcpr*/
*>  >     if (atol(args[0])<i-1)
*>  >       return stralloc(calcpr[atol(args[0])+1]);    
*>  >   }
*>  >   return stralloc("[ERROR: RRD::PRINT argument error]");
*>  > }
*>  > 
*>  > note the first return ...
*> 
*> You're on the right track!  Imagine that.  =:)  I found that
*> the following patch makes <RRD::PRINT 1> work for me:
*> 
*>  --- rrd_cgi.c.orig      Fri Aug 27 14:20:05 1999
*>  +++ rrd_cgi.c   Tue Nov  2 21:09:52 1999
*>  @@ -332,7 +332,7 @@
*>   }
*>  
*>   char* drawprint(long argc, char **args){
*>  -  if (argc>=1 && calcpr != NULL){
*>  +  if (argc==1 && calcpr != NULL){
*>       long i=0;
*>       while (calcpr[i] != NULL) i++; /*determine number lines in calcpr*/
*>       if (atol(args[0])<i-1)
*> 
*>  > let me know if this helps ...
*> 

if you apply the fixpatch from the website the PRINT should work ... 

cheers
tobi
*> oh, yea
*> steve
*> - - -
*> systems guy
*> wiscnet.net
*> 

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
 / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker

--
* 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