Mercurial > hg > orthanc-stone
comparison Applications/IBasicApplication.cpp @ 282:f8e801a678ca
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 Aug 2018 20:56:47 +0200 |
parents | 106a0f9781d9 |
children |
comparison
equal
deleted
inserted
replaced
263:38c795cc7c48 | 282:f8e801a678ca |
---|---|
187 if (parameters.count("orthanc")) | 187 if (parameters.count("orthanc")) |
188 { | 188 { |
189 webService.SetUrl(parameters["orthanc"].as<std::string>()); | 189 webService.SetUrl(parameters["orthanc"].as<std::string>()); |
190 } | 190 } |
191 | 191 |
192 std::string username, password; | |
193 | |
192 if (parameters.count("username")) | 194 if (parameters.count("username")) |
193 { | 195 { |
194 webService.SetUsername(parameters["username"].as<std::string>()); | 196 username = parameters["username"].as<std::string>(); |
195 } | 197 } |
196 | 198 |
197 if (parameters.count("password")) | 199 if (parameters.count("password")) |
198 { | 200 { |
199 webService.SetPassword(parameters["password"].as<std::string>()); | 201 password = parameters["password"].as<std::string>(); |
202 } | |
203 | |
204 if (!username.empty() || | |
205 !password.empty()) | |
206 { | |
207 webService.SetCredentials(username, password); | |
200 } | 208 } |
201 | 209 |
202 LOG(WARNING) << "URL to the Orthanc REST API: " << webService.GetUrl(); | 210 LOG(WARNING) << "URL to the Orthanc REST API: " << webService.GetUrl(); |
203 | 211 |
204 { | 212 { |