fix rt data and mult front
This commit is contained in:
@@ -730,7 +730,14 @@ std::string extractDataJson(const char* inputJson) {
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> messageBody <20>е<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
cJSON* messageBody = cJSON_Parse(messageJson->valuestring); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
const char* messageBodyStr = messageJson->valuestring;
|
||||
if (messageBodyStr == nullptr || strlen(messageBodyStr) == 0) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON or it's empty." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON* messageBody = cJSON_Parse(messageBodyStr); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
if (messageBody == NULL) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
@@ -793,7 +800,14 @@ bool parseJsonMessageRT(const std::string& body, std::string& devSeries, std::st
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> messageBody <20>е<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
cJSON* messageBody = cJSON_Parse(messageJson->valuestring); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
const char* messageBodyStr = messageJson->valuestring;
|
||||
if (messageBodyStr == nullptr || strlen(messageBodyStr) == 0) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON or it's empty." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON* messageBody = cJSON_Parse(messageBodyStr); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
if (messageBody == NULL) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
@@ -1030,7 +1044,14 @@ void parse_set(const std::string& json_str) {
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> messageBody <20>е<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
cJSON* messageBody = cJSON_Parse(messageJson->valuestring); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
const char* messageBodyStr = messageJson->valuestring;
|
||||
if (messageBodyStr == nullptr || strlen(messageBodyStr) == 0) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON or it's empty." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
return;
|
||||
}
|
||||
|
||||
cJSON* messageBody = cJSON_Parse(messageBodyStr); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
if (messageBody == NULL) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
@@ -1053,9 +1074,9 @@ void parse_set(const std::string& json_str) {
|
||||
}
|
||||
|
||||
//<2F>ж<EFBFBD><D0B6>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>̺ţ<CCBA>
|
||||
//int index_value = index->valueint;
|
||||
string index_value_str = index->valuestring;
|
||||
int index_value = StringToInt(index_value_str);
|
||||
int index_value = index->valueint;
|
||||
//string index_value_str = index->valuestring;
|
||||
//int index_value = StringToInt(index_value_str);
|
||||
|
||||
//<2F><><EFBFBD>̺<EFBFBD>Ϊ0<CEAA>Ľ<EFBFBD><C4BD>̴<EFBFBD><CCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>п<EFBFBD><D0BF><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
if (index_value != g_front_seg_index && g_front_seg_index !=0) {
|
||||
@@ -1355,7 +1376,14 @@ void parse_control(const std::string& json_str, const std::string& output_dir) {
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> messageBody <20>е<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
cJSON* messageBody = cJSON_Parse(messageJson->valuestring); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
const char* messageBodyStr = messageJson->valuestring;
|
||||
if (messageBodyStr == nullptr || strlen(messageBodyStr) == 0) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON or it's empty." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
return;
|
||||
}
|
||||
|
||||
cJSON* messageBody = cJSON_Parse(messageBodyStr); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
if (messageBody == NULL) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
@@ -1378,9 +1406,10 @@ void parse_control(const std::string& json_str, const std::string& output_dir) {
|
||||
}
|
||||
|
||||
//<2F>ж<EFBFBD><D0B6>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>̺ţ<CCBA>
|
||||
//int index_value = index->valueint;
|
||||
string index_value_str = index->valuestring;
|
||||
int index_value = StringToInt(index_value_str);
|
||||
int index_value = index->valueint;
|
||||
//string index_value_str = index->valuestring;
|
||||
//int index_value = StringToInt(index_value_str);
|
||||
|
||||
|
||||
//<2F><><EFBFBD>̺<EFBFBD>Ϊ0<CEAA>Ľ<EFBFBD><C4BD>̴<EFBFBD><CCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̨<EFBFBD>˸<EFBFBD><CBB8><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
if (index_value != g_front_seg_index && g_front_seg_index !=0) {
|
||||
|
||||
Reference in New Issue
Block a user