mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 17:21:05 -04:00
merged with upstream/master
This commit is contained in:
commit
9ddef9e45b
59 changed files with 1234 additions and 303 deletions
|
@ -24,6 +24,7 @@
|
|||
*/
|
||||
|
||||
#include "services/p3discovery2.h"
|
||||
#include "pqi/p3peermgr.h"
|
||||
#include "util/rsversioninfo.h"
|
||||
|
||||
#include "retroshare/rsiface.h"
|
||||
|
@ -930,7 +931,10 @@ void p3discovery2::processContactInfo(const SSLID &fromId, const RsDiscContactIt
|
|||
// We pass RS_NODE_PERM_ALL because the PGP id is already a friend, so we should keep the existing
|
||||
// permission flags. Therefore the mask needs to be 0xffff.
|
||||
|
||||
mPeerMgr->addFriend(item->sslId, item->pgpId, item->netMode, RS_VS_DISC_OFF, RS_VS_DHT_FULL,(time_t)0,RS_NODE_PERM_ALL);
|
||||
// set last seen to RS_PEER_OFFLINE_NO_DISC minus 1 so that it won't be shared with other friends
|
||||
// until a first connection is established
|
||||
|
||||
mPeerMgr->addFriend(item->sslId, item->pgpId, item->netMode, RS_VS_DISC_OFF, RS_VS_DHT_FULL, time(NULL) - RS_PEER_OFFLINE_NO_DISC - 1, RS_NODE_PERM_ALL);
|
||||
updatePeerAddresses(item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -353,7 +353,18 @@ bool p3GxsChannels::getPostData(const uint32_t &token, std::vector<RsGxsChannelP
|
|||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Not a GxsChannelPostItem, deleting!" << std::endl;
|
||||
RsGxsCommentItem* cmt = dynamic_cast<RsGxsCommentItem*>(*vit);
|
||||
if(!cmt)
|
||||
{
|
||||
RsGxsMsgItem* msg = (*vit);
|
||||
//const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS = 0x0217;
|
||||
//const uint8_t RS_PKT_SUBTYPE_GXSCHANNEL_POST_ITEM = 0x03;
|
||||
//const uint8_t RS_PKT_SUBTYPE_GXSCOMMENT_COMMENT_ITEM = 0xf1;
|
||||
std::cerr << "Not a GxsChannelPostItem neither a RsGxsCommentItem"
|
||||
<< " PacketService=" << std::hex << (int)msg->PacketService() << std::dec
|
||||
<< " PacketSubType=" << std::hex << (int)msg->PacketSubType() << std::dec
|
||||
<< " , deleting!" << std::endl;
|
||||
}
|
||||
delete *vit;
|
||||
}
|
||||
}
|
||||
|
@ -401,7 +412,18 @@ bool p3GxsChannels::getRelatedPosts(const uint32_t &token, std::vector<RsGxsChan
|
|||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Not a GxsChannelPostItem, deleting!" << std::endl;
|
||||
RsGxsCommentItem* cmt = dynamic_cast<RsGxsCommentItem*>(*vit);
|
||||
if(!cmt)
|
||||
{
|
||||
RsGxsMsgItem* msg = (*vit);
|
||||
//const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS = 0x0217;
|
||||
//const uint8_t RS_PKT_SUBTYPE_GXSCHANNEL_POST_ITEM = 0x03;
|
||||
//const uint8_t RS_PKT_SUBTYPE_GXSCOMMENT_COMMENT_ITEM = 0xf1;
|
||||
std::cerr << "Not a GxsChannelPostItem neither a RsGxsCommentItem"
|
||||
<< " PacketService=" << std::hex << (int)msg->PacketService() << std::dec
|
||||
<< " PacketSubType=" << std::hex << (int)msg->PacketSubType() << std::dec
|
||||
<< " , deleting!" << std::endl;
|
||||
}
|
||||
delete *vit;
|
||||
}
|
||||
}
|
||||
|
@ -1560,7 +1582,7 @@ void p3GxsChannels::handle_event(uint32_t event_type, const std::string &elabel)
|
|||
|
||||
default:
|
||||
/* error */
|
||||
std::cerr << "p3GxsChannels::handle_event() Unknown Event Type: " << event_type;
|
||||
std::cerr << "p3GxsChannels::handle_event() Unknown Event Type: " << event_type << " elabel:" << elabel;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue