[cpp-sp] branch master updated: Removal of more deprecated methods.

Scott Cantor cantor.2 at osu.edu
Fri Apr 27 12:04:56 EDT 2018


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

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

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

The following commit(s) were added to refs/heads/master by this push:
       new  17ca5f9   Removal of more deprecated methods.
17ca5f9 is described below

commit 17ca5f91fd37009bd43570cdcbb4e3d3a9ad0633
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Apr 27 12:04:49 2018 -0400

    Removal of more deprecated methods.
---
 shibsp/binding/impl/XMLProtocolProvider.cpp | 39 ++---------------------------
 shibsp/impl/XMLSecurityPolicyProvider.cpp   | 24 ++----------------
 2 files changed, 4 insertions(+), 59 deletions(-)

diff --git a/shibsp/binding/impl/XMLProtocolProvider.cpp b/shibsp/binding/impl/XMLProtocolProvider.cpp
index 59b9498..a24262e 100644
--- a/shibsp/binding/impl/XMLProtocolProvider.cpp
+++ b/shibsp/binding/impl/XMLProtocolProvider.cpp
@@ -109,7 +109,6 @@ namespace shibsp {
         }
 
     protected:
-        pair<bool,DOMElement*> load(bool backup);
         pair<bool,DOMElement*> background_load();
 
     private:
@@ -188,24 +187,10 @@ XMLProtocolProviderImpl::XMLProtocolProviderImpl(const DOMElement* e, Category&
     }
 }
 
-
-pair<bool,DOMElement*> XMLProtocolProvider::load(bool backup)
+pair<bool,DOMElement*> XMLProtocolProvider::background_load()
 {
     // Load from source using base class.
-    pair<bool,DOMElement*> raw = ReloadableXMLFile::load(backup);
-
-    if (!backup && !m_backing.empty()) {
-        m_log.debug("backing up remote resource to (%s)", m_backing.c_str());
-        try {
-            Locker locker(getBackupLock());
-            ofstream backer(m_backing.c_str());
-            backer << *(raw.second->getOwnerDocument());
-            preserveCacheTag();
-        }
-        catch (std::exception& ex) {
-            m_log.crit("exception while backing up resource: %s", ex.what());
-        }
-    }
+    pair<bool,DOMElement*> raw = ReloadableXMLFile::load();
 
     // If we own it, wrap it.
     XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : nullptr);
@@ -221,25 +206,5 @@ pair<bool,DOMElement*> XMLProtocolProvider::load(bool backup)
     SharedLock locker(m_lock, false);
     m_impl.swap(impl);
 
-
     return make_pair(false,(DOMElement*)nullptr);
 }
-
-pair<bool,DOMElement*> XMLProtocolProvider::background_load()
-{
-    try {
-        return load(false);
-    }
-    catch (long& ex) {
-        if (ex == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED)
-            m_log.info("remote resource (%s) unchanged", m_source.c_str());
-        if (!m_loaded && !m_backing.empty())
-            return load(true);
-        throw;
-    }
-    catch (std::exception&) {
-        if (!m_loaded && !m_backing.empty())
-            return load(true);
-        throw;
-    }
-}
diff --git a/shibsp/impl/XMLSecurityPolicyProvider.cpp b/shibsp/impl/XMLSecurityPolicyProvider.cpp
index ae85a8f..1f4dc2a 100644
--- a/shibsp/impl/XMLSecurityPolicyProvider.cpp
+++ b/shibsp/impl/XMLSecurityPolicyProvider.cpp
@@ -124,7 +124,6 @@ namespace shibsp {
         }
         
     protected:
-        pair<bool,DOMElement*> load(bool backup);
         pair<bool,DOMElement*> background_load();
 
     private:
@@ -297,10 +296,10 @@ XMLSecurityPolicyProviderImpl::XMLSecurityPolicyProviderImpl(const DOMElement* e
 
 vector<xstring> XMLSecurityPolicyProvider::m_empty;
 
-pair<bool,DOMElement*> XMLSecurityPolicyProvider::load(bool backup)
+pair<bool,DOMElement*> XMLSecurityPolicyProvider::background_load()
 {
     // Load from source using base class.
-    pair<bool,DOMElement*> raw = ReloadableXMLFile::load(backup);
+    pair<bool,DOMElement*> raw = ReloadableXMLFile::load();
 
     // If we own it, wrap it.
     XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : nullptr);
@@ -318,22 +317,3 @@ pair<bool,DOMElement*> XMLSecurityPolicyProvider::load(bool backup)
 
     return make_pair(false,(DOMElement*)nullptr);
 }
-
-pair<bool,DOMElement*> XMLSecurityPolicyProvider::background_load()
-{
-    try {
-        return load(false);
-    }
-    catch (long& ex) {
-        if (ex == HTTPResponse::XMLTOOLING_HTTP_STATUS_NOTMODIFIED)
-            m_log.info("remote resource (%s) unchanged", m_source.c_str());
-        if (!m_loaded && !m_backing.empty())
-            return load(true);
-        throw;
-    }
-    catch (std::exception&) {
-        if (!m_loaded && !m_backing.empty())
-            return load(true);
-        throw;
-    }
-}

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


More information about the commits mailing list