diff options
author | Benoit Foucher <benoit@zeroc.com> | 2015-09-14 21:00:50 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2015-09-14 21:00:50 +0200 |
commit | 5cf2787d409d7bad6cf63b992fbdaf982540c763 (patch) | |
tree | de1da25c7acfd57afeb75f5aeb6aee002d1b106c /cpp/test/Ice/acm/TestI.cpp | |
parent | Fixed ICE-6812 - JavaScript ACM monitor bug (diff) | |
download | ice-5cf2787d409d7bad6cf63b992fbdaf982540c763.tar.bz2 ice-5cf2787d409d7bad6cf63b992fbdaf982540c763.tar.xz ice-5cf2787d409d7bad6cf63b992fbdaf982540c763.zip |
Fixed GCC build failure introduced by previous commit
Diffstat (limited to 'cpp/test/Ice/acm/TestI.cpp')
-rw-r--r-- | cpp/test/Ice/acm/TestI.cpp | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/cpp/test/Ice/acm/TestI.cpp b/cpp/test/Ice/acm/TestI.cpp index 869d204cf7e..493221b57a6 100644 --- a/cpp/test/Ice/acm/TestI.cpp +++ b/cpp/test/Ice/acm/TestI.cpp @@ -26,6 +26,40 @@ toString(int value) return os.str(); } +class ConnectionCallbackI : public Ice::ConnectionCallback, private IceUtil::Monitor<IceUtil::Mutex> +{ +public: + + void + waitForCount(int count) + { + Lock sync(*this); + _count = count; + while(_count > 0) + { + wait(); + } + } + +private: + + virtual void + heartbeat(const Ice::ConnectionPtr&) + { + Lock sync(*this); + --_count; + notifyAll(); + } + + virtual void + closed(const Ice::ConnectionPtr&) + { + } + + int _count; +}; +typedef IceUtil::Handle<ConnectionCallbackI> ConnectionCallbackIPtr; + } RemoteObjectAdapterPrx @@ -123,40 +157,7 @@ TestI::interruptSleep(const Ice::Current& current) void TestI::waitForHeartbeat(int count, const Ice::Current& current) { - class ConnectionCallbackI : public Ice::ConnectionCallback, private IceUtil::Monitor<IceUtil::Mutex> - { - public: - - void - waitForCount(int count) - { - Lock sync(*this); - _count = count; - while(_count > 0) - { - wait(); - } - } - - private: - - virtual void - heartbeat(const Ice::ConnectionPtr&) - { - Lock sync(*this); - --_count; - notifyAll(); - } - - virtual void - closed(const Ice::ConnectionPtr&) - { - } - - int _count; - }; - - IceUtil::Handle<ConnectionCallbackI> callback = new ConnectionCallbackI(); + ConnectionCallbackIPtr callback = new ConnectionCallbackI(); current.con->setCallback(callback); callback->waitForCount(count); -}
\ No newline at end of file +} |