diff options
Diffstat (limited to 'cpp/test/Ice/faultTolerance/TestI.cpp')
-rw-r--r-- | cpp/test/Ice/faultTolerance/TestI.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cpp/test/Ice/faultTolerance/TestI.cpp b/cpp/test/Ice/faultTolerance/TestI.cpp index 1f439c7ed7e..60c6e2dc250 100644 --- a/cpp/test/Ice/faultTolerance/TestI.cpp +++ b/cpp/test/Ice/faultTolerance/TestI.cpp @@ -10,8 +10,9 @@ #include <Ice/Ice.h> #include <TestI.h> -TestI::TestI(const Ice::ObjectAdapterPtr& adapter) : - _adapter(adapter) +TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const CleanerPtr& cleaner) : + _adapter(adapter), + _cleaner(cleaner) { } @@ -48,3 +49,18 @@ TestI::pid(const Ice::Current&) return getpid(); #endif } + +CleanerI::CleanerI(const Ice::CommunicatorPtr& communicator) +{ + _communicator = communicator; +} + +void +CleanerI::cleanup(const Ice::Current&) +{ + if(_communicator) + { + _communicator->destroy(); + _communicator = 0; + } +} |