From 96b4651b7c7b860b0fc3416425f90b7d25d13b8c Mon Sep 17 00:00:00 2001 From: drbob Date: Mon, 11 Jul 2011 15:52:29 +0000 Subject: [PATCH] Updated flags to add additional NewsFeed Type: Security! git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4428 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/authssl.cc | 8 ++++---- libretroshare/src/retroshare/rsnotify.h | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index ec23eb795..295c1dbd7 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -1175,11 +1175,11 @@ bool AuthSSLimpl::FailedCertificate(X509 *x509, bool incoming) if (incoming) { - notifyType = RS_FEED_ITEM_PEER_HELLO; + notifyType = RS_FEED_ITEM_SEC_CONNECT_ATTEMPT; } else { - notifyType = RS_FEED_ITEM_PEER_AUTH_DENIED; + notifyType = RS_FEED_ITEM_SEC_AUTH_DENIED; } getPqiNotify()->AddFeedItem(notifyType, gpgid, peerId, sslcn); @@ -1192,11 +1192,11 @@ bool AuthSSLimpl::FailedCertificate(X509 *x509, bool incoming) /* unknown peer! */ if (incoming) { - notifyType = RS_FEED_ITEM_PEER_UNKNOWN_IN; + notifyType = RS_FEED_ITEM_SEC_UNKNOWN_IN; } else { - notifyType = RS_FEED_ITEM_PEER_UNKNOWN_OUT; + notifyType = RS_FEED_ITEM_SEC_UNKNOWN_OUT; } getPqiNotify()->AddFeedItem(notifyType, gpgid, peerId, sslcn); diff --git a/libretroshare/src/retroshare/rsnotify.h b/libretroshare/src/retroshare/rsnotify.h index 1827e90f8..6147184a9 100644 --- a/libretroshare/src/retroshare/rsnotify.h +++ b/libretroshare/src/retroshare/rsnotify.h @@ -62,15 +62,17 @@ const uint32_t RS_FEED_TYPE_BLOG = 0x0080; const uint32_t RS_FEED_TYPE_CHAT = 0x0100; const uint32_t RS_FEED_TYPE_MSG = 0x0200; const uint32_t RS_FEED_TYPE_FILES = 0x0400; +const uint32_t RS_FEED_TYPE_SECURITY = 0x0800; const uint32_t RS_FEED_ITEM_PEER_CONNECT = RS_FEED_TYPE_PEER | 0x0001; const uint32_t RS_FEED_ITEM_PEER_DISCONNECT = RS_FEED_TYPE_PEER | 0x0002; -const uint32_t RS_FEED_ITEM_PEER_NEW = RS_FEED_TYPE_PEER | 0x0003; -const uint32_t RS_FEED_ITEM_PEER_HELLO = RS_FEED_TYPE_PEER | 0x0004; -// new ones for auth denied cases. -const uint32_t RS_FEED_ITEM_PEER_AUTH_DENIED = RS_FEED_TYPE_PEER | 0x0005; -const uint32_t RS_FEED_ITEM_PEER_UNKNOWN_IN = RS_FEED_TYPE_PEER | 0x0006; -const uint32_t RS_FEED_ITEM_PEER_UNKNOWN_OUT = RS_FEED_TYPE_PEER | 0x0007; +const uint32_t RS_FEED_ITEM_PEER_HELLO = RS_FEED_TYPE_PEER | 0x0003; +const uint32_t RS_FEED_ITEM_PEER_NEW = RS_FEED_TYPE_PEER | 0x0004; + +const uint32_t RS_FEED_ITEM_SEC_CONNECT_ATTEMPT = RS_FEED_TYPE_SECURITY | 0x0001; +const uint32_t RS_FEED_ITEM_SEC_AUTH_DENIED = RS_FEED_TYPE_SECURITY | 0x0002; +const uint32_t RS_FEED_ITEM_SEC_UNKNOWN_IN = RS_FEED_TYPE_SECURITY | 0x0003; +const uint32_t RS_FEED_ITEM_SEC_UNKNOWN_OUT = RS_FEED_TYPE_SECURITY | 0x0004; const uint32_t RS_FEED_ITEM_CHAN_NEW = RS_FEED_TYPE_CHAN | 0x0001; const uint32_t RS_FEED_ITEM_CHAN_UPDATE = RS_FEED_TYPE_CHAN | 0x0002;