Optimized calls to p3Peers->getGPGOwnId in MessengerWindow::insertPeers

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3275 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-07-09 22:57:44 +00:00
parent fbd8a33db0
commit 9b72977bba

View File

@ -373,11 +373,13 @@ void MessengerWindow::insertPeers()
rsPeers->getGPGAcceptedList(gpgFriends);
std::string sOwnId = rsPeers->getGPGOwnId();
//add own gpg id, if we have more than on location (ssl client)
std::list<std::string> ownSslContacts;
rsPeers->getSSLChildListOfGPGId(rsPeers->getGPGOwnId(), ownSslContacts);
rsPeers->getSSLChildListOfGPGId(sOwnId, ownSslContacts);
if (ownSslContacts.size() > 0) {
gpgFriends.push_back(rsPeers->getGPGOwnId());
gpgFriends.push_back(sOwnId);
}
/* get a link to the table */
@ -406,7 +408,7 @@ void MessengerWindow::insertPeers()
//add the gpg friends
for(it = gpgFriends.begin(); it != gpgFriends.end(); it++) {
// if (*it == rsPeers->getGPGOwnId()) {
// if (*it == sOwnId) {
// continue;
// }
@ -424,7 +426,7 @@ void MessengerWindow::insertPeers()
RsPeerDetails detail;
if ((!rsPeers->getPeerDetails(*it, detail) || !detail.accept_connection)
&& detail.gpg_id != rsPeers->getGPGOwnId()) {
&& detail.gpg_id != sOwnId) {
//don't accept anymore connection, remove from the view
delete (peertreeWidget->takeTopLevelItem(peertreeWidget->indexOfTopLevelItem(gpg_item)));
continue;