comparison OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp @ 4433:4f92f2b3a3ae

fix build if OpenSSL is disabled
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 Jan 2021 16:06:05 +0100
parents fcbac3e8ac1c
children d9473bd5ed43
comparison
equal deleted inserted replaced
4432:fcbac3e8ac1c 4433:4f92f2b3a3ae
251 throw OrthancException(ErrorCode_ParameterOutOfRange); 251 throw OrthancException(ErrorCode_ParameterOutOfRange);
252 } 252 }
253 253
254 assert(net_ == NULL && 254 assert(net_ == NULL &&
255 params_ == NULL && 255 params_ == NULL &&
256 assoc_ == NULL && 256 assoc_ == NULL);
257 tls_.get() == NULL); 257
258 #if ORTHANC_ENABLE_SSL == 1
259 assert(tls_.get() == NULL);
260 #endif
258 261
259 if (proposed_.empty()) 262 if (proposed_.empty())
260 { 263 {
261 throw OrthancException(ErrorCode_BadSequenceOfCalls, 264 throw OrthancException(ErrorCode_BadSequenceOfCalls,
262 "No presentation context was proposed"); 265 "No presentation context was proposed");
313 parameters.GetRemoteModality().GetPortNumber()); 316 parameters.GetRemoteModality().GetPortNumber());
314 317
315 CheckConnecting(parameters, ASC_setPresentationAddresses(params_, localHost, remoteHostAndPort)); 318 CheckConnecting(parameters, ASC_setPresentationAddresses(params_, localHost, remoteHostAndPort));
316 319
317 // Set various options 320 // Set various options
321 #if ORTHANC_ENABLE_SSL == 1
318 CheckConnecting(parameters, ASC_setTransportLayerType(params_, (tls_.get() != NULL) /*opt_secureConnection*/)); 322 CheckConnecting(parameters, ASC_setTransportLayerType(params_, (tls_.get() != NULL) /*opt_secureConnection*/));
323 #else
324 CheckConnecting(parameters, ASC_setTransportLayerType(params_, false /*opt_secureConnection*/));
325 #endif
319 326
320 // Setup the list of proposed presentation contexts 327 // Setup the list of proposed presentation contexts
321 unsigned int presentationContextId = 1; 328 unsigned int presentationContextId = 1;
322 for (size_t i = 0; i < proposed_.size(); i++) 329 for (size_t i = 0; i < proposed_.size(); i++)
323 { 330 {