[cpp-sp COMMIT] /branches/REL_2/shibsp/impl/ChainingAccessControl.cpp

noreply at shibboleth.net noreply at shibboleth.net
Thu May 24 22:38:09 BST 2012


Author: scantor
Date: Thu May 24 22:38:08 2012
New Revision: 3678

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3678&view=rev
Log:
Use default operator of AND

Modified:
    branches/REL_2/shibsp/impl/ChainingAccessControl.cpp

Modified: branches/REL_2/shibsp/impl/ChainingAccessControl.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/shibsp/impl/ChainingAccessControl.cpp?rev=3678&r1=3677&r2=3678&view=diff
==============================================================================
--- branches/REL_2/shibsp/impl/ChainingAccessControl.cpp (original)
+++ branches/REL_2/shibsp/impl/ChainingAccessControl.cpp Thu May 24 22:38:08 2012
@@ -95,14 +95,12 @@
 {
 }
 
-ChainingAccessControl::ChainingAccessControl(const DOMElement* e)
+ChainingAccessControl::ChainingAccessControl(const DOMElement* e) : m_op(OP_AND)
 {
     const XMLCh* op = e ? e->getAttributeNS(nullptr, _operator) : nullptr;
-    if (XMLString::equals(op, AND))
-        m_op = OP_AND;
-    else if (XMLString::equals(op, OR))
+    if (XMLString::equals(op, OR))
         m_op = OP_OR;
-    else
+    else if (op && *op && !XMLString::equals(op, AND))
         throw ConfigurationException("Missing or unrecognized operator in Chaining AccessControl configuration.");
 
     e = XMLHelper::getFirstChildElement(e, _AccessControl);



More information about the commits mailing list