I recently added some code to log the new NodeAddresses that are added in the NodeCache. I noticed that when I’m connected to only Limewires nothing gets logged, meaning that probably no pongs are received. Well I checked that today it proved right. The reason is that Calitko never sent out any pings (oops). I don’t know how I haven’t noticed that earlier! When testing, I mostly get in Bearshare clouds, which should not be surprising having in mind I never (or very rarely) get Limewire pongs.
I guess I would have noticed the bug earlier if PacketDump were working… I disabled it some time ago when I was in the middle of some major refactoring in LocalPeer and never got back to it again…
Anyway the bug was in PongCache::pingRoutePaths() and has probably slipped in around the same time PacketDump stopped working. The local variable sessions that was supposed to store the return value (the paths a ping should be forwarded over) had the same name as the member storing the connections’ data. The result? No compile error and a function directly returning without doing anything.
Peter
