mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
Merge pull request #1829 from G10h4ck/rsfiles_links
RsFiles links support in libretroshare + a bunch of fixes
This commit is contained in:
commit
2b44492cb6
77 changed files with 2949 additions and 1667 deletions
|
@ -75,8 +75,8 @@ void RsDiscPgpKeyItem::clear()
|
|||
{
|
||||
pgpKeyId.clear();
|
||||
free(bin_data);
|
||||
bin_data = nullptr;
|
||||
bin_len=0;
|
||||
bin_data = nullptr;
|
||||
bin_len = 0;
|
||||
}
|
||||
|
||||
void RsDiscContactItem::clear()
|
||||
|
|
|
@ -84,17 +84,23 @@ class RsDiscPgpKeyItem: public RsDiscItem
|
|||
{
|
||||
public:
|
||||
|
||||
RsDiscPgpKeyItem() : RsDiscItem(RsGossipDiscoveryItemType::PGP_CERT_BINARY)
|
||||
RsDiscPgpKeyItem() :
|
||||
RsDiscItem(RsGossipDiscoveryItemType::PGP_CERT_BINARY),
|
||||
bin_data(nullptr), bin_len(0)
|
||||
{ setPriorityLevel(QOS_PRIORITY_RS_DISC_PGP_CERT); }
|
||||
|
||||
virtual ~RsDiscPgpKeyItem() { delete[](bin_data);bin_data=nullptr;bin_len=0;}
|
||||
|
||||
~RsDiscPgpKeyItem() override { free(bin_data); }
|
||||
void clear() override;
|
||||
void serial_process( RsGenericSerializer::SerializeJob j, RsGenericSerializer::SerializeContext& ctx) override;
|
||||
|
||||
RsPgpId pgpKeyId; // duplicate information for practical reasons
|
||||
unsigned char *bin_data; // binry key data allocated with new unsigned char[]
|
||||
uint32_t bin_len;
|
||||
void serial_process(
|
||||
RsGenericSerializer::SerializeJob j,
|
||||
RsGenericSerializer::SerializeContext& ctx ) override;
|
||||
|
||||
/// duplicate information for practical reasons
|
||||
RsPgpId pgpKeyId;
|
||||
|
||||
unsigned char* bin_data;
|
||||
uint32_t bin_len;
|
||||
};
|
||||
|
||||
class RS_DEPRECATED_FOR(RsDiscPgpKeyItem) RsDiscPgpCertItem: public RsDiscItem
|
||||
|
|
|
@ -108,14 +108,6 @@ p3discovery2::p3discovery2(
|
|||
|
||||
// Add self into PGP FriendList.
|
||||
mFriendList[AuthGPG::getAuthGPG()->getGPGOwnId()] = DiscPgpInfo();
|
||||
|
||||
if(rsEvents)
|
||||
rsEvents->registerEventsHandler(
|
||||
RsEventType::GOSSIP_DISCOVERY,
|
||||
[this](std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
rsEventsHandler(*event);
|
||||
}, mRsEventsHandle ); // mRsEventsHandle is zeroed in initializer list
|
||||
}
|
||||
|
||||
|
||||
|
@ -1284,11 +1276,6 @@ bool p3discovery2::setPeerVersion(const RsPeerId &peerId, const std::string &ver
|
|||
return true;
|
||||
}
|
||||
|
||||
void p3discovery2::rsEventsHandler(const RsEvent& event)
|
||||
{
|
||||
Dbg3() << __PRETTY_FUNCTION__ << " " << static_cast<uint32_t>(event.mType) << std::endl;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************************/
|
||||
/* AuthGPGService */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue