Bug in comment or code

Hal Murray hmurray at megapathdsl.net
Fri Nov 25 14:23:30 UTC 2016


The comment on the tail of the call to record_raw_stats says:
                         /* This will always be 0 by the time we get here */
                         peer->outcount);

If that "always" is correct, something is broken.

outcount is a hack I added to count lost packets.

It's supposed to get bumped when a packet is sent and unbumped when a well 
formed packet is processed.  If all goes well, it will be 0.  But if a packet 
gets lost, the unbump doesn't happen and it will be non-zero when a packet 
finally arrives.

It should get cleared after being printed.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list