mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-01 12:24:36 -04:00
added backend for distant message and distant chat filtering based on contact list
This commit is contained in:
parent
f5c2aa31e3
commit
140205108a
20 changed files with 373 additions and 180 deletions
|
@ -327,6 +327,8 @@ void p3GxsTunnelService::handleRecvTunnelDataItem(const RsGxsTunnelId& tunnel_id
|
|||
#endif
|
||||
|
||||
RsGxsTunnelClientService *service = NULL ;
|
||||
RsGxsId peer_from ;
|
||||
|
||||
{
|
||||
RS_STACK_MUTEX(mGxsTunnelMtx); /********** STACK LOCKED MTX ******/
|
||||
std::map<uint32_t,RsGxsTunnelClientService *>::const_iterator it = mRegisteredServices.find(item->service_id) ;
|
||||
|
@ -341,10 +343,14 @@ void p3GxsTunnelService::handleRecvTunnelDataItem(const RsGxsTunnelId& tunnel_id
|
|||
std::map<RsGxsTunnelId,GxsTunnelPeerInfo>::iterator it2 = _gxs_tunnel_contacts.find(tunnel_id) ;
|
||||
|
||||
if(it2 != _gxs_tunnel_contacts.end())
|
||||
{
|
||||
it2->second.client_services.insert(item->service_id) ;
|
||||
peer_from = it2->second.to_gxs_id ;
|
||||
}
|
||||
}
|
||||
|
||||
service->receiveData(tunnel_id,item->data,item->data_size) ;
|
||||
if(service->acceptDataFromPeer(peer_from))
|
||||
service->receiveData(tunnel_id,item->data,item->data_size) ;
|
||||
|
||||
item->data = NULL ; // avoids deletion, since the client has the memory now
|
||||
item->data_size = 0 ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue