X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fsp.git;a=blobdiff_plain;f=shibsp%2Fhandler%2Fimpl%2FSAML2SessionInitiator.cpp;h=6556f0a48422b2f7c00567053e5699a94fbdbfa0;hp=e6efdd866a773f2626bd5e6973cf1f1061e92f0d;hb=db3dd0f8110b3daa89123ef9994dc86121a92b31;hpb=497084d249d4596420728e6a103e6f74e3c9f644 diff --git a/shibsp/handler/impl/SAML2SessionInitiator.cpp b/shibsp/handler/impl/SAML2SessionInitiator.cpp index e6efdd8..6556f0a 100644 --- a/shibsp/handler/impl/SAML2SessionInitiator.cpp +++ b/shibsp/handler/impl/SAML2SessionInitiator.cpp @@ -492,6 +492,10 @@ pair SAML2SessionInitiator::doRequest( const IDPSSODescriptor* role = NULL; const EndpointType* ep = NULL; const MessageEncoder* encoder = NULL; + + // We won't need this for ECP, but safety dictates we get the lock here. + MetadataProvider* m=app.getMetadataProvider(); + Locker locker(m); if (ECP) { encoder = m_ecp; @@ -502,8 +506,6 @@ pair SAML2SessionInitiator::doRequest( } else { // Use metadata to locate the IdP's SSO service. - MetadataProvider* m=app.getMetadataProvider(); - Locker locker(m); MetadataProvider::Criteria mc(entityID, &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS); entity=m->getEntityDescriptor(mc); if (!entity.first) {