summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/SessionI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2008-04-23 14:19:15 +0200
committerBenoit Foucher <benoit@zeroc.com>2008-04-23 14:19:15 +0200
commit22fa8d1f5865c46b453b8def34f706a141bab1d6 (patch)
tree39967e251eca1ecdfcf11a45098e3546f589dc5f /cpp/src/IceGrid/SessionI.cpp
parentFixed bug 3026 (diff)
downloadice-22fa8d1f5865c46b453b8def34f706a141bab1d6.tar.bz2
ice-22fa8d1f5865c46b453b8def34f706a141bab1d6.tar.xz
ice-22fa8d1f5865c46b453b8def34f706a141bab1d6.zip
Fixed another bug with sessions created from secure connections
Diffstat (limited to 'cpp/src/IceGrid/SessionI.cpp')
-rw-r--r--cpp/src/IceGrid/SessionI.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/cpp/src/IceGrid/SessionI.cpp b/cpp/src/IceGrid/SessionI.cpp
index dc13a8a4d70..8cc681ba469 100644
--- a/cpp/src/IceGrid/SessionI.cpp
+++ b/cpp/src/IceGrid/SessionI.cpp
@@ -319,9 +319,9 @@ ClientSessionFactory::createGlacier2Session(const string& sessionId, const Glaci
int timeout = 0;
if(ctl)
{
- if(_filters)
+ try
{
- try
+ if(_filters)
{
Ice::IdentitySeq ids;
Ice::Identity queryId;
@@ -331,13 +331,19 @@ ClientSessionFactory::createGlacier2Session(const string& sessionId, const Glaci
_servantManager->setSessionControl(session, ctl, ids);
}
- catch(const Ice::LocalException&)
- {
- session->destroy(Ice::Current());
- return 0;
- }
+ timeout = ctl->getSessionTimeout();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ session->destroy(Ice::Current());
+
+ Ice::Warning out(_database->getTraceLevels()->logger);
+ out << "Failed to callback Glacier2 session control object:\n" << ex;
+
+ Glacier2::CannotCreateSessionException ex;
+ ex.reason = "internal server error";
+ throw ex;
}
- timeout = ctl->getSessionTimeout();
}
_reaper->add(new SessionReapable<SessionI>(_database->getTraceLevels()->logger, session), timeout);
@@ -388,7 +394,10 @@ ClientSSLSessionManagerI::create(const Glacier2::SSLInfo& info,
// This shouldn't happen, the SSLInfo is supposed to be encoded by Glacier2.
Ice::Error out(_factory->getTraceLevels()->logger);
out << "SSL session manager couldn't decode SSL certificates:\n" << ex;
- return 0;
+
+ Glacier2::CannotCreateSessionException ex;
+ ex.reason = "internal server error";
+ throw ex;
}
}