p3StatusService::getStatusQueue

- memory leak -> "RsItem* item" was not freed, when "dynamic_cast<RsStatusItem*>" failed
- optimized return of std::list as parameter and not as return. return will copy the list and its not necessary

p3StatusService::getStatus
- memory leak -> items in "std::list<RsStatusItem* > status_items" was not freed
- potential crash, when receiving a status for an unknown peer

p3Peers::getPeerDetails
- optimized - call to "AuthSSL::getAuthSSL()->OwnId()" only once
- optimized - add ip addresses directly to "d.ipAddressList"

PeersDialog::insertPeers
- fixed possible crash, when ssl child has disappeared and was removed from tree, there was a missing continue

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3125 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-06-13 12:26:23 +00:00
parent 61f2c14663
commit 0d1eaba890
5 changed files with 53 additions and 51 deletions

View file

@ -996,17 +996,19 @@ bool AuthGPG::getGPGDetails(std::string id, RsPeerDetails &d)
certmap::iterator it;
if (mKeyList.end() != (it = mKeyList.find(id)))
{
d.id = it->second.id; //keep, it but can be bug gen
d.gpg_id = it->second.id;
d.name = it->second.name;
d.email = it->second.email;
d.trustLvl = it->second.trustLvl;
d.validLvl = it->second.validLvl;
d.ownsign = it->second.ownsign;
d.gpgSigners = it->second.signers;
d.fpr = it->second.fpr;
gpgcert &cert = it->second;
d.accept_connection = it->second.accept_connection;
d.id = cert.id; //keep, it but can be bug gen
d.gpg_id = cert.id;
d.name = cert.name;
d.email = cert.email;
d.trustLvl = cert.trustLvl;
d.validLvl = cert.validLvl;
d.ownsign = cert.ownsign;
d.gpgSigners = cert.signers;
d.fpr = cert.fpr;
d.accept_connection = cert.accept_connection;
//did the peer signed me ?
d.hasSignedMe = false;
@ -1019,7 +1021,7 @@ bool AuthGPG::getGPGDetails(std::string id, RsPeerDetails &d)
}
#ifdef GPG_DEBUG
std::cerr << "AuthGPG::getPGPDetails() Name : " << it->second.name << std::endl;
std::cerr << "AuthGPG::getPGPDetails() Name : " << cert.name << std::endl;
#endif
return true;
}