[AGENT++] FW: BUGS in AGENT++

Igor Altshul ialtshul at allot.com
Wed Apr 6 07:53:15 CEST 2005


 
Hi.
 
Here are some bugs in AGENT++ lib.
 
 
1. In function nlmLogEntry::add_notification() in file "notification_log_mib.cpp" wrong calling to snmpNotifyFilterEntry::passes_filter( ...) function.

 

 

Instead 

    snmpNotifyFilterEntry::passes_filter(   nid,  Oidx::from_string(profileName, TRUE),  vbs, pdu.get_vb_count())

must be 

    snmpNotifyFilterEntry::passes_filter(   Oidx::from_string(profileName, FALSE),  nid,  vbs, pdu.get_vb_count())

 

 

 

 

2. in function nlmLogEntry::add_notification() in file "notification_log_mib.cpp"  passes the 'filter name' as argument snmpNotifyFilterEntry::passes_filter( ...) function. But it waits for 'target param name'.

 

Workaround: I define same names for correspond filterName and targetParamsName

 

I propose to change snmpNotifyFilterEntry::passes_filter( ...) such that it uses filterName  instead targetParamsName.

 

 

3. In function int Oidx::compare(const Oidx& other, u_int wildcard) const implemented in file "snmp_pp_ext.cpp" error in case one of the compared oids have length exactly wilcard.


I propose instead 

 

int Oidx::compare(const Oidx& other, u_int wildcard) const 

{
 Oidx maskedOid(*this);
 Oidx maskedOther(other);
 if ((this->len() > wildcard) && (other.len() > wildcard)) {
  maskedOid[wildcard] = 0;
  maskedOther[wildcard] = 0;
 }

.

.

.

 
do 
 

int Oidx::compare(const Oidx& other, u_int wildcard) const 

{
 Oidx maskedOid(*this);
 Oidx maskedOther(other);
 if (this->len() > wildcard)
  maskedOid[wildcard] = 0;

 

if(other.len() > wildcard)
  maskedOther[wildcard] = 0;

.

.

.

 


 

Igor Altshul.

Senior Software Engineer.
 



More information about the AGENTPP mailing list