Unneeded conditional.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 9 Nov 2007 06:23:08 +0000 (06:23 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 9 Nov 2007 06:23:08 +0000 (06:23 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2593 cb58f699-b61c-0410-a6fe-9272a202ed29

adfs/adfs.cpp

index 3c0fdff..833cc63 100644 (file)
@@ -335,29 +335,27 @@ pair<bool,long> ADFSSessionInitiator::run(SPRequest& request, const char* entity
     }
 
     // Since we're not passing by index, we need to fully compute the return URL.
-    if (!ACS) {
-        // Get all the ADFS endpoints.
-        const vector<const Handler*>& handlers = app.getAssertionConsumerServicesByBinding(m_binding.get());
-
-        // Index comes from request, or default set in the handler, or we just pick the first endpoint.
-        pair<bool,unsigned int> index = make_pair(false,0);
-        if (isHandler) {
-            option = request.getParameter("acsIndex");
-            if (option)
-                index = make_pair(true, atoi(option));
-        }
-        if (!index.first)
-            index = getUnsignedInt("defaultACSIndex");
-        if (index.first) {
-            for (vector<const Handler*>::const_iterator h = handlers.begin(); !ACS && h!=handlers.end(); ++h) {
-                if (index.second == (*h)->getUnsignedInt("index").second)
-                    ACS = *h;
-            }
-        }
-        else if (!handlers.empty()) {
-            ACS = handlers.front();
+    // Get all the ADFS endpoints.
+    const vector<const Handler*>& handlers = app.getAssertionConsumerServicesByBinding(m_binding.get());
+
+    // Index comes from request, or default set in the handler, or we just pick the first endpoint.
+    pair<bool,unsigned int> index = make_pair(false,0);
+    if (isHandler) {
+        option = request.getParameter("acsIndex");
+        if (option)
+            index = make_pair(true, atoi(option));
+    }
+    if (!index.first)
+        index = getUnsignedInt("defaultACSIndex");
+    if (index.first) {
+        for (vector<const Handler*>::const_iterator h = handlers.begin(); !ACS && h!=handlers.end(); ++h) {
+            if (index.second == (*h)->getUnsignedInt("index").second)
+                ACS = *h;
         }
     }
+    else if (!handlers.empty()) {
+        ACS = handlers.front();
+    }
     if (!ACS)
         throw ConfigurationException("Unable to locate ADFS response endpoint.");