Bug in agentGen??

helge.fredriksen____4tel.no helge.fredriksen____4tel.no
Thu Jun 8 13:49:15 CEST 2000


Hello!
 
I've been generating code with agentGen, and have come across something that
seems like a bug to me:
 
The following code is typical for checking valid range on SnmpInt32's and
Gauge32's:
 
boolean cacheDBstoreDays::value_ok(const Vbx& vb)
{
 long v;
 vb.get_value(v);
 if (!(((v >= 1) && (v <= 365))))
   return FALSE;
 // place additional code to check validity of new values here
 return TRUE;
}
 
The problem with this code is the declaration of v, which always is
decleared as long, not as
SnmpIn32 or Gauge32 dependent of the type of MO you are dealing with. This
results in the
value v=66 for the case of Gauge32....
 
This should not be a hard fix to perform in the perl-script responsible for
the code generation i believe...
 
 
Helge.Fredriksen at 4tel.no <mailto:Helge.Fredriksen at 4tel.no> 
System developer, EDB 4tel, 8002 BODØ, NORWAY
Tel: 75 51 24 82 (direct line), 75 51 24 00 (switchboard)
Fax: 75 51 24 01
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20000608/7c4a3fe6/attachment.htm 


More information about the AGENTPP mailing list