* Use random, not rand, in rak::generate_random as the latter wasn't

being seeded.

* Added a flag to PeerInfo for those that are in handshake, which is
used by PeerList::connect_keep_handshake flag to decide if that
address is to be re-added to the available list when there is already
a connection in progress. This ensures that multiple ports on the same
address don't end up discarded prematurely.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@770 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-09-01 16:33:21 +00:00
parent af6eb493a9
commit 66dd9a3304
+1 -1
View File
@@ -279,7 +279,7 @@ generate_random(size_t length) {
Sequence s;
s.reserve(length);
std::generate_n(std::back_inserter(s), length, &std::rand);
std::generate_n(std::back_inserter(s), length, &::random);
return s;
}