mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
Added and modified patch from Anonym
- when an unknow user attempt to connect, show the name in the security item git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6079 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e7536960c3
commit
72e5d10bcd
@ -538,7 +538,7 @@ void NewsFeed::addFeedItemPeerNew(RsFeedItem &fi)
|
|||||||
void NewsFeed::addFeedItemSecurityConnectAttempt(RsFeedItem &fi)
|
void NewsFeed::addFeedItemSecurityConnectAttempt(RsFeedItem &fi)
|
||||||
{
|
{
|
||||||
/* make new widget */
|
/* make new widget */
|
||||||
SecurityItem *pi = new SecurityItem(this, NEWSFEED_SECLIST, fi.mId1, fi.mId2, fi.mId4, SEC_TYPE_CONNECT_ATTEMPT, false);
|
SecurityItem *pi = new SecurityItem(this, NEWSFEED_SECLIST, fi.mId1, fi.mId2, fi.mId3, fi.mId4, SEC_TYPE_CONNECT_ATTEMPT, false);
|
||||||
|
|
||||||
/* store */
|
/* store */
|
||||||
|
|
||||||
@ -554,7 +554,7 @@ void NewsFeed::addFeedItemSecurityConnectAttempt(RsFeedItem &fi)
|
|||||||
void NewsFeed::addFeedItemSecurityAuthDenied(RsFeedItem &fi)
|
void NewsFeed::addFeedItemSecurityAuthDenied(RsFeedItem &fi)
|
||||||
{
|
{
|
||||||
/* make new widget */
|
/* make new widget */
|
||||||
SecurityItem *pi = new SecurityItem(this, NEWSFEED_SECLIST, fi.mId1, fi.mId2, fi.mId4, SEC_TYPE_AUTH_DENIED, false);
|
SecurityItem *pi = new SecurityItem(this, NEWSFEED_SECLIST, fi.mId1, fi.mId2, fi.mId3, fi.mId4, SEC_TYPE_AUTH_DENIED, false);
|
||||||
|
|
||||||
/* store */
|
/* store */
|
||||||
|
|
||||||
@ -570,7 +570,7 @@ void NewsFeed::addFeedItemSecurityAuthDenied(RsFeedItem &fi)
|
|||||||
void NewsFeed::addFeedItemSecurityUnknownIn(RsFeedItem &fi)
|
void NewsFeed::addFeedItemSecurityUnknownIn(RsFeedItem &fi)
|
||||||
{
|
{
|
||||||
/* make new widget */
|
/* make new widget */
|
||||||
SecurityItem *pi = new SecurityItem(this, NEWSFEED_SECLIST, fi.mId1, fi.mId2, fi.mId4, SEC_TYPE_UNKNOWN_IN, false);
|
SecurityItem *pi = new SecurityItem(this, NEWSFEED_SECLIST, fi.mId1, fi.mId2, fi.mId3, fi.mId4, SEC_TYPE_UNKNOWN_IN, false);
|
||||||
|
|
||||||
/* store */
|
/* store */
|
||||||
|
|
||||||
@ -586,7 +586,7 @@ void NewsFeed::addFeedItemSecurityUnknownIn(RsFeedItem &fi)
|
|||||||
void NewsFeed::addFeedItemSecurityUnknownOut(RsFeedItem &fi)
|
void NewsFeed::addFeedItemSecurityUnknownOut(RsFeedItem &fi)
|
||||||
{
|
{
|
||||||
/* make new widget */
|
/* make new widget */
|
||||||
SecurityItem *pi = new SecurityItem(this, NEWSFEED_SECLIST, fi.mId1, fi.mId2, fi.mId4, SEC_TYPE_UNKNOWN_OUT, false);
|
SecurityItem *pi = new SecurityItem(this, NEWSFEED_SECLIST, fi.mId1, fi.mId2, fi.mId3, fi.mId4, SEC_TYPE_UNKNOWN_OUT, false);
|
||||||
|
|
||||||
/* store */
|
/* store */
|
||||||
|
|
||||||
|
@ -43,9 +43,9 @@
|
|||||||
****/
|
****/
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const std::string &gpgId, const std::string &sslId, const std::string& ip_address,uint32_t type, bool isHome)
|
SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const std::string &gpgId, const std::string &sslId, const std::string &sslCn, const std::string& ip_address,uint32_t type, bool isHome)
|
||||||
:QWidget(NULL), mParent(parent), mFeedId(feedId),
|
:QWidget(NULL), mParent(parent), mFeedId(feedId),
|
||||||
mSslId(sslId), mGpgId(gpgId), mType(type), mIsHome(isHome), mIP(ip_address)
|
mGpgId(gpgId), mSslId(sslId), mSslCn(sslCn), mType(type), mIsHome(isHome), mIP(ip_address)
|
||||||
{
|
{
|
||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
@ -180,9 +180,9 @@ void SecurityItem::updateItem()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* set peer name */
|
/* set peer name */
|
||||||
peerNameLabel->setText(tr("Unknown Peer"));
|
peerNameLabel->setText(QString("%1 (%2)").arg(tr("Unknown Peer"), QString::fromUtf8(mSslCn.c_str())));
|
||||||
|
|
||||||
nameLabel->setText(QString::fromStdString(mGpgId));
|
nameLabel->setText(QString::fromUtf8(mSslCn.c_str()) + " (" + QString::fromStdString(mGpgId) + ")");
|
||||||
idLabel->setText(QString::fromStdString(mSslId));
|
idLabel->setText(QString::fromStdString(mSslId));
|
||||||
|
|
||||||
statusLabel->setText(tr("Unknown Peer"));
|
statusLabel->setText(tr("Unknown Peer"));
|
||||||
|
@ -38,7 +38,7 @@ class SecurityItem : public QWidget, private Ui::SecurityItem
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/** Default Constructor */
|
/** Default Constructor */
|
||||||
SecurityItem(FeedHolder *parent, uint32_t feedId, const std::string &gpgId, const std::string &sslId, const std::string& ip_addr,uint32_t type, bool isHome);
|
SecurityItem(FeedHolder *parent, uint32_t feedId, const std::string &gpgId, const std::string &sslId, const std::string &sslCn, const std::string& ip_addr,uint32_t type, bool isHome);
|
||||||
|
|
||||||
void updateItemStatic();
|
void updateItemStatic();
|
||||||
|
|
||||||
@ -66,8 +66,9 @@ private:
|
|||||||
FeedHolder *mParent;
|
FeedHolder *mParent;
|
||||||
uint32_t mFeedId;
|
uint32_t mFeedId;
|
||||||
|
|
||||||
std::string mSslId;
|
|
||||||
std::string mGpgId;
|
std::string mGpgId;
|
||||||
|
std::string mSslId;
|
||||||
|
std::string mSslCn;
|
||||||
std::string mIP;
|
std::string mIP;
|
||||||
uint32_t mType;
|
uint32_t mType;
|
||||||
bool mIsHome;
|
bool mIsHome;
|
||||||
|
Loading…
Reference in New Issue
Block a user