From ef13e03e5a9e19172b2bd7cecd20bdd5075c03f2 Mon Sep 17 00:00:00 2001 From: Phenom Date: Sun, 22 Oct 2017 11:52:00 +0200 Subject: [PATCH] Fix SecurityIpItem isSame --- retroshare-gui/src/gui/NewsFeed.cpp | 2 +- retroshare-gui/src/gui/feeds/SecurityIpItem.cpp | 4 ++-- retroshare-gui/src/gui/feeds/SecurityIpItem.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/retroshare-gui/src/gui/NewsFeed.cpp b/retroshare-gui/src/gui/NewsFeed.cpp index 5da89940a..93ba2fc13 100644 --- a/retroshare-gui/src/gui/NewsFeed.cpp +++ b/retroshare-gui/src/gui/NewsFeed.cpp @@ -1116,7 +1116,7 @@ static bool addFeedItemIfUniqueCallback(FeedItem *feedItem, void *data) if (findData->mSecurityIpItem) { SecurityIpItem *securityIpItem = dynamic_cast(feedItem); - if (securityIpItem && securityIpItem->isSame(findData->mId1, findData->mId2, findData->mType)) { + if (securityIpItem && securityIpItem->isSame(RsPeerId(findData->mId1), findData->mId2, findData->mId3, findData->mType)) { return true; } return false; diff --git a/retroshare-gui/src/gui/feeds/SecurityIpItem.cpp b/retroshare-gui/src/gui/feeds/SecurityIpItem.cpp index c2cca5d57..be2d2cc19 100644 --- a/retroshare-gui/src/gui/feeds/SecurityIpItem.cpp +++ b/retroshare-gui/src/gui/feeds/SecurityIpItem.cpp @@ -79,9 +79,9 @@ void SecurityIpItem::setup() updateItem(); } -bool SecurityIpItem::isSame(const std::string& ipAddr, const std::string& ipAddrReported, uint32_t type) +bool SecurityIpItem::isSame(const RsPeerId &sslId, const std::string& ipAddr, const std::string& ipAddrReported, uint32_t type) { - if (mType == type && mIpAddr == ipAddr && mIpAddrReported == ipAddrReported) { + if (mType == type && mSslId==sslId && mIpAddr == ipAddr && mIpAddrReported == ipAddrReported) { return true; } diff --git a/retroshare-gui/src/gui/feeds/SecurityIpItem.h b/retroshare-gui/src/gui/feeds/SecurityIpItem.h index 949140c83..93f6a4c26 100644 --- a/retroshare-gui/src/gui/feeds/SecurityIpItem.h +++ b/retroshare-gui/src/gui/feeds/SecurityIpItem.h @@ -44,7 +44,7 @@ public: void updateItemStatic(); - bool isSame(const std::string& ipAddr, const std::string& ipAddrReported, uint32_t type); + bool isSame(const RsPeerId &sslId, const std::string& ipAddr, const std::string& ipAddrReported, uint32_t type); protected: /* FeedItem */