From: cantor Date: Sun, 27 Jan 2008 20:09:08 +0000 (+0000) Subject: Avoid any chance of a double lock. X-Git-Tag: 2.4~579 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fsp.git;a=commitdiff_plain;h=497084d249d4596420728e6a103e6f74e3c9f644 Avoid any chance of a double lock. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2707 cb58f699-b61c-0410-a6fe-9272a202ed29 --- diff --git a/shibsp/impl/StorageServiceSessionCache.cpp b/shibsp/impl/StorageServiceSessionCache.cpp index f5c9d60..becb716 100644 --- a/shibsp/impl/StorageServiceSessionCache.cpp +++ b/shibsp/impl/StorageServiceSessionCache.cpp @@ -1325,17 +1325,14 @@ Session* SSCache::find(const Application& application, const char* key, const ch if (timeout && *timeout > 0 && now - lastAccess >= *timeout) { m_log.info("session timed out (ID: %s)", key); remove(application, key); - RetryableProfileException ex("Your session has expired, and you must re-authenticate."); const char* eid = obj["entity_id"].string(); if (!eid) { obj.destroy(); - throw ex; + throw RetryableProfileException("Your session has expired, and you must re-authenticate."); } string eid2(eid); obj.destroy(); - MetadataProvider* m=application.getMetadataProvider(); - Locker locker(m); - annotateException(&ex,m->getEntityDescriptor(MetadataProvider::Criteria(eid2.c_str(),NULL,NULL,false)).first); // throws it + throw RetryableProfileException("Your session has expired, and you must re-authenticate.", namedparams(1, "entityID", eid2.c_str())); } if (timeout) {