mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed according to comments on PR 1334
This commit is contained in:
parent
59a76a9418
commit
2b80c23f6a
@ -153,6 +153,6 @@ void RsDiscContactItem::serial_process(RsGenericSerializer::SerializeJob j,RsGen
|
||||
|
||||
void RsDiscIdentityListItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
||||
{
|
||||
RsTypeSerializer::serial_process(j,ctx,ownIdentityList,"identityList");
|
||||
RS_SERIAL_PROCESS(ownIdentityList);
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ public:
|
||||
virtual ~RsDiscIdentityListItem() {}
|
||||
|
||||
virtual void clear() { ownIdentityList.clear() ; }
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob /* j */,RsGenericSerializer::SerializeContext& /* ctx */);
|
||||
virtual void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
|
||||
|
||||
std::list<RsGxsId> ownIdentityList ;
|
||||
};
|
||||
|
@ -264,12 +264,12 @@ int p3discovery2::handleIncoming()
|
||||
|
||||
int nhandled = 0;
|
||||
// While messages read
|
||||
while(NULL != (item = recvItem()))
|
||||
while(nullptr != (item = recvItem()))
|
||||
{
|
||||
RsDiscPgpListItem *pgplist = NULL;
|
||||
RsDiscPgpCertItem *pgpcert = NULL;
|
||||
RsDiscContactItem *contact = NULL;
|
||||
RsDiscIdentityListItem *gxsidlst = NULL;
|
||||
RsDiscPgpListItem *pgplist = nullptr;
|
||||
RsDiscPgpCertItem *pgpcert = nullptr;
|
||||
RsDiscContactItem *contact = nullptr;
|
||||
RsDiscIdentityListItem *gxsidlst = nullptr;
|
||||
nhandled++;
|
||||
|
||||
#ifdef P3DISC_DEBUG
|
||||
@ -278,21 +278,21 @@ int p3discovery2::handleIncoming()
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
if (NULL != (contact = dynamic_cast<RsDiscContactItem *> (item)))
|
||||
if (nullptr != (contact = dynamic_cast<RsDiscContactItem *> (item)))
|
||||
{
|
||||
if (item->PeerId() == contact->sslId) /* self describing */
|
||||
recvOwnContactInfo(item->PeerId(), contact);
|
||||
else
|
||||
processContactInfo(item->PeerId(), contact);
|
||||
}
|
||||
else if (NULL != (gxsidlst = dynamic_cast<RsDiscIdentityListItem *> (item)))
|
||||
else if (nullptr != (gxsidlst = dynamic_cast<RsDiscIdentityListItem *> (item)))
|
||||
{
|
||||
recvIdentityList(item->PeerId(),gxsidlst->ownIdentityList) ;
|
||||
delete item;
|
||||
}
|
||||
else if (NULL != (pgpcert = dynamic_cast<RsDiscPgpCertItem *> (item)))
|
||||
else if (nullptr != (pgpcert = dynamic_cast<RsDiscPgpCertItem *> (item)))
|
||||
recvPGPCertificate(item->PeerId(), pgpcert);
|
||||
else if (NULL != (pgplist = dynamic_cast<RsDiscPgpListItem *> (item)))
|
||||
else if (nullptr != (pgplist = dynamic_cast<RsDiscPgpListItem *> (item)))
|
||||
{
|
||||
/* two types */
|
||||
if (pgplist->mode == DISC_PGP_LIST_MODE_FRIENDS)
|
||||
|
Loading…
Reference in New Issue
Block a user