replaced std::rand() with custom random generator

This commit is contained in:
Arvid Norberg
2011-02-26 07:55:51 +00:00
parent 7288f77ec9
commit ab3b82b8ee
18 changed files with 48 additions and 31 deletions

View File

@@ -41,6 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/enum_net.hpp"
#include "libtorrent/socket_io.hpp"
#include "libtorrent/io_service.hpp"
//#include "libtorrent/random.hpp"
#if BOOST_VERSION < 103500
#include <asio/ip/host_name.hpp>
@@ -434,7 +435,7 @@ void natpmp::on_reply(error_code const& e
// simulate packet loss
/*
if ((rand() % 2) == 0)
if ((random() % 2) == 0)
{
log(" simulating drop", l);
return;