mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 12:24:24 -04:00
re-enabled GRouter tunnels (disabled for testing). Removed debug output.
This commit is contained in:
parent
f0a49a427e
commit
a85b5d2fab
1 changed files with 47 additions and 47 deletions
|
@ -198,7 +198,7 @@
|
||||||
#include "grouterclientservice.h"
|
#include "grouterclientservice.h"
|
||||||
|
|
||||||
/**********************/
|
/**********************/
|
||||||
#define GROUTER_DEBUG
|
//#define GROUTER_DEBUG
|
||||||
/**********************/
|
/**********************/
|
||||||
|
|
||||||
const std::string p3GRouter::SERVICE_INFO_APP_NAME = "Global Router" ;
|
const std::string p3GRouter::SERVICE_INFO_APP_NAME = "Global Router" ;
|
||||||
|
@ -916,56 +916,56 @@ void p3GRouter::routePendingObjects()
|
||||||
|
|
||||||
std::map<RsPeerId,uint32_t> peers_and_duplication_factors ;
|
std::map<RsPeerId,uint32_t> peers_and_duplication_factors ;
|
||||||
|
|
||||||
// if(it->second.routing_flags & GRouterRoutingInfo::ROUTING_FLAGS_ALLOW_TUNNELS)
|
if(it->second.routing_flags & GRouterRoutingInfo::ROUTING_FLAGS_ALLOW_TUNNELS)
|
||||||
// locked_collectAvailableTunnels(it->second.tunnel_hash,it->second.data_item->duplication_factor,peers_and_duplication_factors);
|
locked_collectAvailableTunnels(it->second.tunnel_hash,it->second.data_item->duplication_factor,peers_and_duplication_factors);
|
||||||
//
|
|
||||||
// if(!peers_and_duplication_factors.empty())
|
if(!peers_and_duplication_factors.empty())
|
||||||
// {
|
{
|
||||||
//#ifdef GROUTER_DEBUG
|
#ifdef GROUTER_DEBUG
|
||||||
// std::cerr << " tunnels available! sending!" << std::endl;
|
std::cerr << " tunnels available! sending!" << std::endl;
|
||||||
//#endif
|
#endif
|
||||||
// locked_sendToPeers(it->second.data_item,peers_and_duplication_factors) ;
|
locked_sendToPeers(it->second.data_item,peers_and_duplication_factors) ;
|
||||||
//
|
|
||||||
// // change item state in waiting list
|
// change item state in waiting list
|
||||||
//
|
|
||||||
// it->second.data_status = RS_GROUTER_DATA_STATUS_ONGOING ;
|
it->second.data_status = RS_GROUTER_DATA_STATUS_ONGOING ;
|
||||||
// it->second.data_transaction_TS = now ;
|
it->second.data_transaction_TS = now ;
|
||||||
//
|
|
||||||
// pending_messages_changed = true ;
|
pending_messages_changed = true ;
|
||||||
// continue ; // no need to seek for friend asynced routes since tunnels directly go to the final destination!
|
continue ; // no need to seek for friend asynced routes since tunnels directly go to the final destination!
|
||||||
// }
|
}
|
||||||
|
|
||||||
if(it->second.routing_flags & GRouterRoutingInfo::ROUTING_FLAGS_ALLOW_FRIENDS)
|
if(it->second.routing_flags & GRouterRoutingInfo::ROUTING_FLAGS_ALLOW_FRIENDS)
|
||||||
locked_collectAvailableFriends(it->second.data_item->destination_key,it->second.incoming_routes.ids,it->second.data_item->duplication_factor,peers_and_duplication_factors);
|
locked_collectAvailableFriends(it->second.data_item->destination_key,it->second.incoming_routes.ids,it->second.data_item->duplication_factor,peers_and_duplication_factors);
|
||||||
|
|
||||||
// if(!peers_and_duplication_factors.empty())
|
if(!peers_and_duplication_factors.empty())
|
||||||
// {
|
{
|
||||||
//#ifdef GROUTER_DEBUG
|
#ifdef GROUTER_DEBUG
|
||||||
// std::cerr << " friends available! sending!" << std::endl;
|
std::cerr << " friends available! sending!" << std::endl;
|
||||||
//#endif
|
#endif
|
||||||
// locked_sendToPeers(it->second.data_item,peers_and_duplication_factors) ;
|
locked_sendToPeers(it->second.data_item,peers_and_duplication_factors) ;
|
||||||
//
|
|
||||||
// // change item state in waiting list
|
// change item state in waiting list
|
||||||
//
|
|
||||||
// it->second.data_status = RS_GROUTER_DATA_STATUS_ONGOING ;
|
it->second.data_status = RS_GROUTER_DATA_STATUS_ONGOING ;
|
||||||
// it->second.data_transaction_TS = now ;
|
it->second.data_transaction_TS = now ;
|
||||||
//
|
|
||||||
// pending_messages_changed = true ;
|
pending_messages_changed = true ;
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
//#ifdef GROUTER_DEBUG
|
#ifdef GROUTER_DEBUG
|
||||||
// std::cerr << " no direct friends available" << std::endl;
|
std::cerr << " no direct friends available" << std::endl;
|
||||||
//#endif
|
#endif
|
||||||
//
|
|
||||||
// if(it->second.received_time_TS + DIRECT_FRIEND_TRY_DELAY < now && !(it->second.routing_flags & GRouterRoutingInfo::ROUTING_FLAGS_ALLOW_TUNNELS))
|
if(it->second.received_time_TS + DIRECT_FRIEND_TRY_DELAY < now && !(it->second.routing_flags & GRouterRoutingInfo::ROUTING_FLAGS_ALLOW_TUNNELS))
|
||||||
// {
|
{
|
||||||
//#ifdef GROUTER_DEBUG
|
#ifdef GROUTER_DEBUG
|
||||||
// std::cerr << " enabling tunnels for this message." << std::endl;
|
std::cerr << " enabling tunnels for this message." << std::endl;
|
||||||
//#endif
|
#endif
|
||||||
// it->second.routing_flags |= GRouterRoutingInfo::ROUTING_FLAGS_ALLOW_TUNNELS ;
|
it->second.routing_flags |= GRouterRoutingInfo::ROUTING_FLAGS_ALLOW_TUNNELS ;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(it->second.data_status == RS_GROUTER_DATA_STATUS_ONGOING && now > MAX_TRANSACTION_ACK_WAITING_TIME + it->second.data_transaction_TS)
|
else if(it->second.data_status == RS_GROUTER_DATA_STATUS_ONGOING && now > MAX_TRANSACTION_ACK_WAITING_TIME + it->second.data_transaction_TS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue