Fix SecurityIpItem isSame

This commit is contained in:
Phenom 2017-10-22 11:52:00 +02:00
parent b6f102cabb
commit ef13e03e5a
3 changed files with 4 additions and 4 deletions

View File

@ -1116,7 +1116,7 @@ static bool addFeedItemIfUniqueCallback(FeedItem *feedItem, void *data)
if (findData->mSecurityIpItem) {
SecurityIpItem *securityIpItem = dynamic_cast<SecurityIpItem*>(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;

View File

@ -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;
}

View File

@ -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 */