[cpp-opensaml] branch master updated: Don't invalidate disco feed when non-disco md changes.

Scott Cantor cantor.2 at osu.edu
Wed Mar 28 20:52:46 EDT 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-opensaml.git;a=commit;h=ba1af5f52bf63a8b942344ea3f82b3b920d17f46

The following commit(s) were added to refs/heads/master by this push:
       new  ba1af5f   Don't invalidate disco feed when non-disco md changes.
ba1af5f is described below

commit ba1af5f52bf63a8b942344ea3f82b3b920d17f46
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Mar 28 20:52:35 2018 -0400

    Don't invalidate disco feed when non-disco md changes.
---
 saml/saml2/metadata/impl/ChainingMetadataProvider.cpp | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
index 18db31f..9668ffa 100644
--- a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp
@@ -98,18 +98,22 @@ namespace opensaml {
             }
 
             void onEvent(const ObservableMetadataProvider& provider) const {
-                // Reset the cache tag for the feed.
                 Lock lock(m_trackerLock);
-                SAMLConfig::getConfig().generateRandomBytes(m_feedTag, 4);
-                m_feedTag = SAMLArtifact::toHex(m_feedTag);
+                if (dynamic_cast<const DiscoverableMetadataProvider*>(&provider)) {
+                    // Reset the cache tag for the feed.
+                    SAMLConfig::getConfig().generateRandomBytes(m_feedTag, 4);
+                    m_feedTag = SAMLArtifact::toHex(m_feedTag);
+                }
                 emitChangeEvent();
             }
 
             void onEvent(const ObservableMetadataProvider& provider, const EntityDescriptor& entity) const {
-                // Reset the cache tag for the feed.
                 Lock lock(m_trackerLock);
-                SAMLConfig::getConfig().generateRandomBytes(m_feedTag, 4);
-                m_feedTag = SAMLArtifact::toHex(m_feedTag);
+                if (dynamic_cast<const DiscoverableMetadataProvider*>(&provider)) {
+                    // Reset the cache tag for the feed.
+                    SAMLConfig::getConfig().generateRandomBytes(m_feedTag, 4);
+                    m_feedTag = SAMLArtifact::toHex(m_feedTag);
+                }
                 emitChangeEvent(entity);
             }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list