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/src/Glacier2/RequestQueue.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/src/Glacier2/RequestQueue.cpp')
-rw-r--r-- | cpp/src/Glacier2/RequestQueue.cpp | 19 |
1 files changed, 11 insertions, 8 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; + } } } |