diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-03-14 12:30:16 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-03-14 12:30:16 +0100 |
commit | 02b77c815801bb9571bbf16d66e67bdb8cee9fa1 (patch) | |
tree | 014615fc35a9a9f4c146ca58efaaec102ba418e2 /cpp | |
parent | fix hellow world expect script. (diff) | |
download | ice-02b77c815801bb9571bbf16d66e67bdb8cee9fa1.tar.bz2 ice-02b77c815801bb9571bbf16d66e67bdb8cee9fa1.tar.xz ice-02b77c815801bb9571bbf16d66e67bdb8cee9fa1.zip |
Minor fixes
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Glacier2/RequestQueue.cpp | 19 | ||||
-rw-r--r-- | cpp/src/Glacier2/RequestQueue.h | 1 | ||||
-rw-r--r-- | cpp/src/Ice/SelectorThread.cpp | 10 |
3 files changed, 12 insertions, 18 deletions
diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp index a3ffbd85550..7556aaee266 100644 --- a/cpp/src/Glacier2/RequestQueue.cpp +++ b/cpp/src/Glacier2/RequestQueue.cpp @@ -203,16 +203,19 @@ bool Glacier2::RequestQueue::addRequest(const RequestPtr& request) { IceUtil::Mutex::Lock lock(*this); - for(vector<RequestPtr>::iterator p = _requests.begin(); p != _requests.end(); ++p) + if(request->hasOverride()) { - // - // If the new request overrides an old one, then abort the old - // request and replace it with the new request. - // - if(request->override(*p)) + for(vector<RequestPtr>::iterator p = _requests.begin(); p != _requests.end(); ++p) { - *p = request; - return true; + // + // If the new request overrides an old one, then abort the old + // request and replace it with the new request. + // + if(request->override(*p)) + { + *p = request; + return true; + } } } diff --git a/cpp/src/Glacier2/RequestQueue.h b/cpp/src/Glacier2/RequestQueue.h index dfc21b7d5e3..e91aa46e48b 100644 --- a/cpp/src/Glacier2/RequestQueue.h +++ b/cpp/src/Glacier2/RequestQueue.h @@ -33,6 +33,7 @@ public: bool invoke(); bool override(const RequestPtr&) const; const Ice::ObjectPrx& getProxy() const { return _proxy; } + bool hasOverride() const { return !_override.empty(); } private: diff --git a/cpp/src/Ice/SelectorThread.cpp b/cpp/src/Ice/SelectorThread.cpp index 0045abf2cf9..6be73b316e5 100644 --- a/cpp/src/Ice/SelectorThread.cpp +++ b/cpp/src/Ice/SelectorThread.cpp @@ -261,11 +261,6 @@ IceInternal::SelectorThread::HelperThread::HelperThread(const SelectorThreadPtr& void IceInternal::SelectorThread::HelperThread::run() { - if(_selectorThread->_instance->initializationData().threadHook) - { - _selectorThread->_instance->initializationData().threadHook->start(); - } - try { _selectorThread->run(); @@ -281,10 +276,5 @@ IceInternal::SelectorThread::HelperThread::run() out << "unknown exception in selector thread"; } - if(_selectorThread->_instance->initializationData().threadHook) - { - _selectorThread->_instance->initializationData().threadHook->stop(); - } - _selectorThread = 0; // Break cyclic dependency. } |