ledgerupdate testing

This commit is contained in:
lnk
2025-02-11 18:23:19 +08:00
parent faaef4f166
commit 898d5e043d
10 changed files with 201 additions and 52 deletions

View File

@@ -1017,7 +1017,7 @@ void parse_set(const std::string& json_str) {
return;
}
cJSON* index = cJSON_GetObjectItem(root, "index");
cJSON* index = cJSON_GetObjectItem(messageBoy, "index");
if (index == nullptr) {
std::cout << "Missing 'index' in JSON." << std::endl;
cJSON_Delete(root);
@@ -1047,7 +1047,7 @@ void parse_set(const std::string& json_str) {
if(g_node_id == STAT_DATA_BASE_NODE_ID && g_front_seg_index == 1){
std::cout << "cfg_stat_data process" << g_front_seg_index <<" handle this msg" << std::endl;
// <20><><EFBFBD><EFBFBD> set_process
cJSON* data = cJSON_GetObjectItem(root, "data");
cJSON* data = cJSON_GetObjectItem(messageBoy, "data");
if (data != nullptr && data->type == cJSON_Array) {
int data_size = cJSON_GetArraySize(data);
for (int i = 0; i < data_size; i++) {
@@ -1084,7 +1084,7 @@ void parse_set(const std::string& json_str) {
if(g_node_id == STAT_DATA_BASE_NODE_ID && g_front_seg_index == 1){
std::cout << "cfg_stat_data process" << g_front_seg_index <<" handle this msg" << std::endl;
// <20><><EFBFBD><EFBFBD> set_process
cJSON* data = cJSON_GetObjectItem(root, "data");
cJSON* data = cJSON_GetObjectItem(messageBoy, "data");
if (data != nullptr && data->type == cJSON_Array) {
int data_size = cJSON_GetArraySize(data);
for (int i = 0; i < data_size; i++) {