summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/AdminSessionI.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/AdminSessionI.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/AdminSessionI.cpp')
-rw-r--r--cpp/src/IceGrid/AdminSessionI.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp
index 7d6df65b559..a486629d5d0 100644
--- a/cpp/src/IceGrid/AdminSessionI.cpp
+++ b/cpp/src/IceGrid/AdminSessionI.cpp
@@ -417,25 +417,31 @@ AdminSessionFactory::createGlacier2Session(const string& sessionId, const Glacie
int timeout = 0;
if(ctl)
{
- if(_filters)
+ try
{
- try
+ if(_filters)
{
Ice::IdentitySeq ids;
Ice::Identity queryId;
queryId.category = _database->getInstanceName();
queryId.name = "Query";
ids.push_back(queryId);
-
+
_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<AdminSessionI>(_database->getTraceLevels()->logger, session), timeout);
@@ -486,7 +492,10 @@ AdminSSLSessionManagerI::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;
}
}