Implemented client datasource
This commit is contained in:
@@ -553,9 +553,8 @@ bool ParseHistoryInfo(const std::string& json, HistoryInfoMsg& out) {
|
||||
out.signals.clear();
|
||||
out.enabled = false;
|
||||
|
||||
char tmp[16] = "";
|
||||
jsonGetStr(json.c_str(), "enabled", tmp, sizeof(tmp));
|
||||
out.enabled = (strcmp(tmp, "true") == 0);
|
||||
/* "enabled" is a JSON boolean (unquoted true/false), not a string */
|
||||
out.enabled = (strstr(json.c_str(), "\"enabled\":true") != nullptr);
|
||||
|
||||
double df = 0.0;
|
||||
jsonGetDouble(json.c_str(), "durationHours", df);
|
||||
|
||||
Reference in New Issue
Block a user