Description from original patch writer:
My computer is connected to 2 huge LANs and the internet.
Respectively, the outside world knows it by 3 different IPs.
There are dc hubs on the two LANs and, of course, on the internet.
I noticed that when I connect to hubs which are on networks different
from the network of the hub I have first connected to, the active
searches never work on these hubs. After some investigation I found that
the IP my client sends to these hubs in search requests was wrong.
In the same time the IP sent in ConnectToMe requests was correct,
so that I could download files, but could not do searches.
The attached patch solves this problem by removing bogus cachedIp
code used in search requests, and makes the behaviour of search consistent
with the behavior of ConnectToMe. Please notice that the functionality of
Client::getLocalIp() is similar to that of the removed
ClientManager::updateCachedIp(), except that the former does not make
any assumptions about hosts having just a single IP.
Moreover, despite the fact that the caching approach was simply incorrect,
it was also useless because the IP was already stored locally
(see the code of Client::getLocalIp()).
|