mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 06:09:09 -04:00
added more error info for failed servicePerm packet. Fixed small bug in GXS-distantChat. Data passes through. Crypto still pending.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7379 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b6c68d1812
commit
b7f794c37d
2 changed files with 7 additions and 4 deletions
|
@ -51,7 +51,7 @@
|
|||
* #define CHAT_DEBUG 1
|
||||
* #define DEBUG_DISTANT_CHAT 1
|
||||
****/
|
||||
#define DEBUG_DISTANT_CHAT 1
|
||||
//#define DEBUG_DISTANT_CHAT 1
|
||||
|
||||
static const int CONNECTION_CHALLENGE_MAX_COUNT = 20 ; // sends a connection challenge every 20 messages
|
||||
static const time_t CONNECTION_CHALLENGE_MAX_MSG_AGE = 30 ; // maximum age of a message to be used in a connection challenge
|
||||
|
@ -311,13 +311,16 @@ bool p3ChatService::getHashFromVirtualPeerId(const TurtleVirtualPeerId& vpid,Tur
|
|||
|
||||
void p3ChatService::sendPrivateChatItem(RsChatItem *item)
|
||||
{
|
||||
TurtleFileHash hash ;
|
||||
TurtleFileHash hash = hashFromDistantChatPeerId(item->PeerId());
|
||||
|
||||
if(getHashFromVirtualPeerId(item->PeerId(),hash)) // the hash is not used here. That can be optimized.
|
||||
std::map<RsFileHash,DistantChatPeerInfo>::const_iterator it = _distant_chat_peers.find(hash) ;
|
||||
|
||||
if(it != _distant_chat_peers.end())
|
||||
{
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cerr << "p3ChatService::sendPrivateChatItem(): sending to " << item->PeerId() << ": interpreted as a distant chat virtual peer id." << std::endl;
|
||||
#endif
|
||||
item->PeerId(it->second.virtual_peer_id) ;
|
||||
sendTurtleData(item) ;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue