mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-14 05:55:13 +01:00
Merge pull request #4476 from FearlessTobi/fix-testcase-sending
web_service: move telemetry condition from TelemetrySession constructor to destructor
This commit is contained in:
commit
b9f7c9142a
@ -93,13 +93,9 @@ bool VerifyLogin(const std::string& username, const std::string& token) {
|
|||||||
|
|
||||||
TelemetrySession::TelemetrySession() {
|
TelemetrySession::TelemetrySession() {
|
||||||
#ifdef ENABLE_WEB_SERVICE
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
if (Settings::values.enable_telemetry) {
|
|
||||||
backend = std::make_unique<WebService::TelemetryJson>(Settings::values.web_api_url,
|
backend = std::make_unique<WebService::TelemetryJson>(Settings::values.web_api_url,
|
||||||
Settings::values.citra_username,
|
Settings::values.citra_username,
|
||||||
Settings::values.citra_token);
|
Settings::values.citra_token);
|
||||||
} else {
|
|
||||||
backend = std::make_unique<Telemetry::NullVisitor>();
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
backend = std::make_unique<Telemetry::NullVisitor>();
|
backend = std::make_unique<Telemetry::NullVisitor>();
|
||||||
#endif
|
#endif
|
||||||
@ -199,6 +195,7 @@ TelemetrySession::~TelemetrySession() {
|
|||||||
// This is just a placeholder to wrap up the session once the core completes and this is
|
// This is just a placeholder to wrap up the session once the core completes and this is
|
||||||
// destroyed. This will be moved elsewhere once we are actually doing real I/O with the service.
|
// destroyed. This will be moved elsewhere once we are actually doing real I/O with the service.
|
||||||
field_collection.Accept(*backend);
|
field_collection.Accept(*backend);
|
||||||
|
if (Settings::values.enable_telemetry)
|
||||||
backend->Complete();
|
backend->Complete();
|
||||||
backend = nullptr;
|
backend = nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user