[AGENT++] Bug in NotificationOriginator->add_v3_trap_destination()?

Josh Pressnell joshua.pressnell at rti-world.com
Thu Feb 2 16:17:55 CET 2006


Folks,

I think I may have found a bug in the NotificationOriginator class' 
add_v3_trap_destination() function.  I am looking at the following code:

for (int i=0; i<i<addr.get_length()-2; i++) {
        address += (unsigned char)ip[i];
}

The test clause of the for loop appears invalid, and at the very least 
yields an infinite loop in my environment (VC++ 6).  I'm guessing that 
the double "i<" should be removed to leave "i<addr.get_length()-2".

Can anyone confirm this?

-Josh

--
-- Official RTI e-mail  ---
--





More information about the AGENTPP mailing list