summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-04-24 12:55:05 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-04-24 12:55:05 +0000
commit30f9a6d2ac35cb17b6c25c8425831877a1e5bb85 (patch)
tree59a9d915d1517690745e916a617dde02c7d79f01 /cpp/test
parentCompleted fix for bug 947 (diff)
downloadice-30f9a6d2ac35cb17b6c25c8425831877a1e5bb85.tar.bz2
ice-30f9a6d2ac35cb17b6c25c8425831877a1e5bb85.tar.xz
ice-30f9a6d2ac35cb17b6c25c8425831877a1e5bb85.zip
Modified shutdown
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Glacier2/sessionControl/Client.cpp10
-rw-r--r--cpp/test/Glacier2/sessionControl/Session.ice3
-rw-r--r--cpp/test/Glacier2/sessionControl/SessionI.cpp12
-rw-r--r--cpp/test/Glacier2/sessionControl/SessionI.h5
4 files changed, 11 insertions, 19 deletions
diff --git a/cpp/test/Glacier2/sessionControl/Client.cpp b/cpp/test/Glacier2/sessionControl/Client.cpp
index ab633b856f6..063d81d4aa8 100644
--- a/cpp/test/Glacier2/sessionControl/Client.cpp
+++ b/cpp/test/Glacier2/sessionControl/Client.cpp
@@ -67,15 +67,9 @@ SessionControlClient::run(int argc, char* argv[])
}
cout << "ok" << endl;
- cout << "recreating session... " << flush;
- sessionBase = router->createSession("userid", "abc123");
- ObjectPrx base = communicator()->stringToProxy("SessionManager:tcp -p 12010 -t 10000");
- Test::SessionManagerPrx sessionManager = Test::SessionManagerPrx::uncheckedCast(base);
- sessionManager->ice_ping();
- cout << "ok" << endl;
-
cout << "testing shutdown... " << flush;
- sessionManager->shutdown();
+ session = Test::SessionPrx::uncheckedCast(router->createSession("userid", "abc123"));
+ session->shutdown();
communicator()->setDefaultRouter(0);
ObjectPrx adminBase = communicator()->stringToProxy("Glacier2/admin:tcp -h 127.0.0.1 -p 12348 -t 10000");
Glacier2::AdminPrx admin = Glacier2::AdminPrx::checkedCast(adminBase);
diff --git a/cpp/test/Glacier2/sessionControl/Session.ice b/cpp/test/Glacier2/sessionControl/Session.ice
index 88a1f70f242..a3b5792cd5f 100644
--- a/cpp/test/Glacier2/sessionControl/Session.ice
+++ b/cpp/test/Glacier2/sessionControl/Session.ice
@@ -18,10 +18,7 @@ module Test
interface Session extends Glacier2::Session
{
void destroySession();
-};
-interface SessionManager extends Glacier2::SessionManager
-{
void shutdown();
};
diff --git a/cpp/test/Glacier2/sessionControl/SessionI.cpp b/cpp/test/Glacier2/sessionControl/SessionI.cpp
index 7af199803dc..23338612e6e 100644
--- a/cpp/test/Glacier2/sessionControl/SessionI.cpp
+++ b/cpp/test/Glacier2/sessionControl/SessionI.cpp
@@ -19,12 +19,6 @@ SessionManagerI::create(const string&, const Glacier2::SessionControlPrx& sessio
return Glacier2::SessionPrx::uncheckedCast(current.adapter->addWithUUID(new SessionI(sessionControl)));
}
-void
-SessionManagerI::shutdown(const Ice::Current& current)
-{
- current.adapter->getCommunicator()->shutdown();
-}
-
SessionI::SessionI(const Glacier2::SessionControlPrx& sessionControl) :
_sessionControl(sessionControl)
{
@@ -38,6 +32,12 @@ SessionI::destroySession(const Ice::Current& current)
}
void
+SessionI::shutdown(const Ice::Current& current)
+{
+ current.adapter->getCommunicator()->shutdown();
+}
+
+void
SessionI::destroy(const Ice::Current& current)
{
current.adapter->remove(current.id);
diff --git a/cpp/test/Glacier2/sessionControl/SessionI.h b/cpp/test/Glacier2/sessionControl/SessionI.h
index 957823d4350..b6b1515a4b8 100644
--- a/cpp/test/Glacier2/sessionControl/SessionI.h
+++ b/cpp/test/Glacier2/sessionControl/SessionI.h
@@ -12,12 +12,11 @@
#include <Session.h>
-class SessionManagerI : public Test::SessionManager
+class SessionManagerI : public Glacier2::SessionManager
{
public:
virtual Glacier2::SessionPrx create(const std::string&, const Glacier2::SessionControlPrx&, const Ice::Current&);
- virtual void shutdown(const Ice::Current&);
};
@@ -28,6 +27,8 @@ public:
SessionI(const Glacier2::SessionControlPrx&);
virtual void destroySession(const Ice::Current&);
+ virtual void shutdown(const Ice::Current&);
+
virtual void destroy(const Ice::Current&);
private: