comparison OrthancServer/OrthancInitialization.cpp @ 814:aeee9cc66dd9

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 May 2014 15:29:27 +0200
parents 8a36c947490c
children a811bdf8b8eb
comparison
equal deleted inserted replaced
813:b640aeee11ba 814:aeee9cc66dd9
530 { 530 {
531 boost::mutex::scoped_lock lock(globalMutex_); 531 boost::mutex::scoped_lock lock(globalMutex_);
532 532
533 if (!configuration_->isMember("DicomModalities")) 533 if (!configuration_->isMember("DicomModalities"))
534 { 534 {
535 throw OrthancException(ErrorCode_BadFileFormat); 535 (*configuration_) ["DicomModalities"] = Json::objectValue;
536 } 536 }
537 537
538 Json::Value& modalities = (*configuration_) ["DicomModalities"]; 538 Json::Value& modalities = (*configuration_) ["DicomModalities"];
539 if (modalities.type() != Json::objectValue) 539 if (modalities.type() != Json::objectValue)
540 { 540 {
573 { 573 {
574 boost::mutex::scoped_lock lock(globalMutex_); 574 boost::mutex::scoped_lock lock(globalMutex_);
575 575
576 if (!configuration_->isMember("OrthancPeers")) 576 if (!configuration_->isMember("OrthancPeers"))
577 { 577 {
578 throw OrthancException(ErrorCode_BadFileFormat); 578 (*configuration_) ["OrthancPeers"] = Json::objectValue;
579 } 579 }
580 580
581 Json::Value& peers = (*configuration_) ["OrthancPeers"]; 581 Json::Value& peers = (*configuration_) ["OrthancPeers"];
582 if (peers.type() != Json::objectValue) 582 if (peers.type() != Json::objectValue)
583 { 583 {