Mercurial > hg > orthanc
comparison OrthancServer/OrthancGetRequestHandler.h @ 3953:620e87e9e816 c-get
c-get: fixing memory with failedUIDs_
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 20 May 2020 09:19:35 +0200 |
parents | 4f78da5613a1 |
children | 67b457283499 |
comparison
equal
deleted
inserted
replaced
3952:4f09a6a2b369 | 3953:620e87e9e816 |
---|---|
53 | 53 |
54 unsigned int nRemaining_; | 54 unsigned int nRemaining_; |
55 unsigned int nCompleted_; | 55 unsigned int nCompleted_; |
56 unsigned int warningCount_; | 56 unsigned int warningCount_; |
57 unsigned int nFailed_; | 57 unsigned int nFailed_; |
58 char *failedUIDs_; | 58 std::string failedUIDs_; |
59 | 59 |
60 T_DIMSE_Priority priority_; | 60 T_DIMSE_Priority priority_; |
61 DIC_US origMsgId; | 61 DIC_US origMsgId; |
62 T_ASC_PresentationContextID origPresId; | 62 T_ASC_PresentationContextID origPresId; |
63 | 63 |
73 DcmDataset *dataset); | 73 DcmDataset *dataset); |
74 | 74 |
75 void addFailedUIDInstance(const char *sopInstance); | 75 void addFailedUIDInstance(const char *sopInstance); |
76 | 76 |
77 public: | 77 public: |
78 OrthancGetRequestHandler(ServerContext& context) : | 78 OrthancGetRequestHandler(ServerContext& context); |
79 context_(context) | 79 |
80 { | |
81 position_ = 0; | |
82 | |
83 nRemaining_ = 0; | |
84 nCompleted_ = 0; | |
85 warningCount_ = 0; | |
86 nFailed_ = 0; | |
87 | |
88 failedUIDs_ = NULL; | |
89 } | |
90 | |
91 bool Handle(const DicomMap& input, | 80 bool Handle(const DicomMap& input, |
92 const std::string& originatorIp, | 81 const std::string& originatorIp, |
93 const std::string& originatorAet, | 82 const std::string& originatorAet, |
94 const std::string& calledAet); | 83 const std::string& calledAet); |
95 | 84 |
96 virtual Status DoNext(T_ASC_Association *); | 85 virtual Status DoNext(T_ASC_Association *) ORTHANC_OVERRIDE; |
97 | 86 |
98 virtual unsigned int GetSubOperationCount() const | 87 virtual unsigned int GetSubOperationCount() const ORTHANC_OVERRIDE |
99 { | 88 { |
100 return (unsigned int) instances_.size(); | 89 return (unsigned int) instances_.size(); |
101 } | 90 } |
102 | 91 |
103 virtual unsigned int nRemaining() | 92 virtual unsigned int nRemaining() const ORTHANC_OVERRIDE |
104 { | 93 { |
105 return nRemaining_; | 94 return nRemaining_; |
106 } | 95 } |
107 | 96 |
108 virtual unsigned int nCompleted() | 97 virtual unsigned int nCompleted() const ORTHANC_OVERRIDE |
109 { | 98 { |
110 return nCompleted_; | 99 return nCompleted_; |
111 } | 100 } |
112 | 101 |
113 virtual unsigned int warningCount() | 102 virtual unsigned int warningCount() const ORTHANC_OVERRIDE |
114 { | 103 { |
115 return warningCount_; | 104 return warningCount_; |
116 } | 105 } |
117 | 106 |
118 virtual unsigned int nFailed() | 107 virtual unsigned int nFailed() const ORTHANC_OVERRIDE |
119 { | 108 { |
120 return nFailed_; | 109 return nFailed_; |
121 } | 110 } |
122 | 111 |
123 virtual const char * failedUids() | 112 virtual const std::string& failedUids() const ORTHANC_OVERRIDE |
124 { | 113 { |
125 return failedUIDs_; | 114 return failedUIDs_; |
126 } | 115 } |
127 | |
128 | |
129 | |
130 }; | 116 }; |
131 } | 117 } |