comparison Core/DicomNetworking/DicomUserConnection.cpp @ 3741:21efa32c8a10 storage-commitment

safeguard
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Mar 2020 14:28:37 +0100
parents 4fc24b69446a
children c6658187e4b1
comparison
equal deleted inserted replaced
3740:e69c556f1913 3741:21efa32c8a10
1683 if (sopClassUids.size() != sopInstanceUids.size()) 1683 if (sopClassUids.size() != sopInstanceUids.size())
1684 { 1684 {
1685 throw OrthancException(ErrorCode_ParameterOutOfRange); 1685 throw OrthancException(ErrorCode_ParameterOutOfRange);
1686 } 1686 }
1687 1687
1688 for (size_t i = 0; i < sopClassUids.size(); i++)
1689 {
1690 if (sopClassUids[i].empty() ||
1691 sopInstanceUids[i].empty())
1692 {
1693 throw OrthancException(ErrorCode_ParameterOutOfRange,
1694 "The SOP class/instance UIDs cannot be empty, found: \"" +
1695 sopClassUids[i] + "\" / \"" + sopInstanceUids[i] + "\"");
1696 }
1697 }
1698
1688 if (transactionUid.size() < 5 || 1699 if (transactionUid.size() < 5 ||
1689 transactionUid.substr(0, 5) != "2.25.") 1700 transactionUid.substr(0, 5) != "2.25.")
1690 { 1701 {
1691 throw OrthancException(ErrorCode_ParameterOutOfRange); 1702 throw OrthancException(ErrorCode_ParameterOutOfRange);
1692 } 1703 }