Mercurial > hg > orthanc-stone
comparison Framework/Loaders/DicomStructureSetLoader.cpp @ 977:262a0244e9b2 toa2019090201
Added missing Unregister for objects that register by the broker + logs + guard in FetchContext
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 02 Sep 2019 17:29:26 +0200 |
parents | 48710d53086f |
children | c20dbaab360c |
comparison
equal
deleted
inserted
replaced
976:3abc47e051c8 | 977:262a0244e9b2 |
---|---|
202 | 202 |
203 for (std::set<std::string>::const_iterator | 203 for (std::set<std::string>::const_iterator |
204 it = instances.begin(); it != instances.end(); ++it) | 204 it = instances.begin(); it != instances.end(); ++it) |
205 { | 205 { |
206 std::auto_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand); | 206 std::auto_ptr<OrthancRestApiCommand> command(new OrthancRestApiCommand); |
207 #if 0 | |
208 if (logbgo115) | |
209 LOG(TRACE) << " DicomStructureSetLoader::LoadStructure::Handle() about to schedule /tools/lookup command with LookupInstance on result"; | |
210 #endif | |
211 command->SetUri("/tools/lookup"); | 207 command->SetUri("/tools/lookup"); |
212 command->SetMethod(Orthanc::HttpMethod_Post); | 208 command->SetMethod(Orthanc::HttpMethod_Post); |
213 command->SetBody(*it); | 209 command->SetBody(*it); |
214 | 210 |
215 // The following headers have been commented out because | 211 // The following headers have been commented out because |
216 // they were causing issues in the reverse proxy in a dev scenario. | 212 // they were causing issues in the reverse proxy in a dev scenario. |
217 // They should NOT be required for POST requests | 213 // They should NOT be required for POST requests |
218 //command->SetHttpHeader("pragma", "no-cache"); | 214 //command->SetHttpHeader("pragma", "no-cache"); |
219 //command->SetHttpHeader("cache-control", "no-cache"); | 215 //command->SetHttpHeader("cache-control", "no-cache"); |
220 #if 0 | 216 |
221 std::string itStr(*it); | |
222 if(itStr == "1.3.12.2.1107.5.1.4.66930.30000018062412550879500002198") { | |
223 if (logbgo115) | |
224 LOG(ERROR) << "******** BOGUS LOOKUPS FROM NOW ON ***********"; | |
225 logbgo233 = true; | |
226 } | |
227 #endif | |
228 command->SetPayload(new LookupInstance(loader, *it)); | 217 command->SetPayload(new LookupInstance(loader, *it)); |
229 //LOG(TRACE) << "About to schedule a /tools/lookup POST request. URI = " << command->GetUri() << " Body size = " << (*it).size() << " Body = " << (*it) << "\n"; | 218 //LOG(TRACE) << "About to schedule a /tools/lookup POST request. URI = " << command->GetUri() << " Body size = " << (*it).size() << " Body = " << (*it) << "\n"; |
230 Schedule(command.release()); | 219 Schedule(command.release()); |
231 #if 0 | |
232 if (logbgo115) | |
233 LOG(TRACE) << " DicomStructureSetLoader::LoadStructure::Handle() request scheduled. Command will be LookupInstance and post body is " << *it; | |
234 #endif | |
235 } | 220 } |
236 } | 221 } |
237 }; | 222 }; |
238 | 223 |
239 | 224 |