changeset 296:ac9fd144feae am-2

fix
author am@osimis.io
date Mon, 10 Sep 2018 12:20:14 +0200
parents b04b13810540
children 1992f7b8563e
files Applications/Generic/NativeStoneApplicationRunner.cpp
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Generic/NativeStoneApplicationRunner.cpp	Tue Sep 04 15:09:42 2018 +0200
+++ b/Applications/Generic/NativeStoneApplicationRunner.cpp	Mon Sep 10 12:20:14 2018 +0200
@@ -121,7 +121,7 @@
                 << std::endl
                 << "Orthanc, lightweight, RESTful DICOM server for healthcare and medical research."
                 << std::endl << std::endl
-                << "Demonstration application of Orthanc Stone using SDL."
+                << "Demonstration application of Orthanc Stone in native environment."
                 << std::endl;
 
       std::cout << options << "\n";
@@ -157,14 +157,10 @@
         webServiceParameters.SetUrl(parameters["orthanc"].as<std::string>());
       }
 
-      if (parameters.count("username"))
+      if (parameters.count("username") && parameters.count("password"))
       {
-        webServiceParameters.SetUsername(parameters["username"].as<std::string>());
-      }
-
-      if (parameters.count("password"))
-      {
-        webServiceParameters.SetPassword(parameters["password"].as<std::string>());
+        webServiceParameters.SetCredentials(parameters["username"].as<std::string>(),
+            parameters["password"].as<std::string>());
       }
 
       LOG(WARNING) << "URL to the Orthanc REST API: " << webServiceParameters.GetUrl();