ms visual studio 2013 support

not full support
This commit is contained in:
mikhail4021 2014-01-09 23:56:07 +04:00
parent 6341b10556
commit 55392ce783
19 changed files with 670 additions and 20 deletions

View file

@ -1,4 +1,5 @@
#include <endian.h>
#include "I2PEndian.h"
#include <boost/thread.hpp>
#include <cryptopp/sha.h>
#include "RouterContext.h"
#include "Log.h"
@ -255,9 +256,9 @@ namespace tunnel
void Tunnels::Run ()
{
sleep (1); // wait for other parts are ready
boost::this_thread::sleep(boost::posix_time::seconds(1)); // wait for other parts are ready
uint32_t lastTs = 0;
uint64_t lastTs = 0;
while (m_IsRunning)
{
try
@ -283,7 +284,7 @@ namespace tunnel
msg = m_Queue.Get ();
}
uint32_t ts = i2p::util::GetSecondsSinceEpoch ();
uint64_t ts = i2p::util::GetSecondsSinceEpoch ();
if (ts - lastTs >= 15) // manage tunnels every 15 seconds
{
ManageTunnels ();
@ -326,7 +327,7 @@ namespace tunnel
void Tunnels::ManageOutboundTunnels ()
{
uint32_t ts = i2p::util::GetSecondsSinceEpoch ();
uint64_t ts = i2p::util::GetSecondsSinceEpoch ();
for (auto it = m_OutboundTunnels.begin (); it != m_OutboundTunnels.end ();)
{
if (ts > (*it)->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
@ -366,7 +367,7 @@ namespace tunnel
void Tunnels::ManageInboundTunnels ()
{
uint32_t ts = i2p::util::GetSecondsSinceEpoch ();
uint64_t ts = i2p::util::GetSecondsSinceEpoch ();
for (auto it = m_InboundTunnels.begin (); it != m_InboundTunnels.end ();)
{
if (ts > it->second->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)