Mercurial > hg > orthanc
diff OrthancServer/OrthancMoveRequestHandler.cpp @ 3697:5331918773e7
Fix issue #154 (Matching against list of UID-s by C-MOVE)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 26 Feb 2020 11:57:59 +0100 |
parents | 94f4a18a79cc |
children | 5cbbf14e516b |
line wrap: on
line diff
--- a/OrthancServer/OrthancMoveRequestHandler.cpp Wed Feb 26 11:16:35 2020 +0100 +++ b/OrthancServer/OrthancMoveRequestHandler.cpp Wed Feb 26 11:57:59 2020 +0100 @@ -241,7 +241,24 @@ else { const std::string& content = value.GetContent(); - context_.GetIndex().LookupIdentifierExact(publicIds, level, tag, content); + + /** + * This tokenization fixes issue 154 ("Matching against list of + * UID-s by C-MOVE"). + * https://bitbucket.org/sjodogne/orthanc/issues/154/ + **/ + + std::vector<std::string> tokens; + Toolbox::TokenizeString(tokens, content, '\\'); + for (size_t i = 0; i < tokens.size(); i++) + { + std::vector<std::string> matches; + context_.GetIndex().LookupIdentifierExact(matches, level, tag, tokens[i]); + + // Concatenate "publicIds" with "matches" + publicIds.insert(publicIds.end(), matches.begin(), matches.end()); + } + return true; } }