Bug in comment or code

Eric S. Raymond esr at thyrsus.com
Fri Nov 25 14:33:58 UTC 2016


Hal Murray <hmurray at megapathdsl.net>:
> 
> 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.

Daniel, I think this one is yours. IIRC you jusy had to modify the outcount
logic.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list