summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorliuwentan <[email protected]>2022-12-14 15:28:21 +0800
committerliuwentan <[email protected]>2022-12-14 15:28:21 +0800
commit9778267b48c27d1cef8233662bd6950550ab7875 (patch)
tree95a4d18215dab8aff109f4e06cdbd8c4c3e035d9 /tools
parent95b2123b5f12e5b80e1ab0ebb0628189080c2b4d (diff)
add dynamic config unit-test and hierarchy unfinished
Diffstat (limited to 'tools')
-rw-r--r--tools/maat_redis_tool.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/maat_redis_tool.cpp b/tools/maat_redis_tool.cpp
index 428d40c..68306c6 100644
--- a/tools/maat_redis_tool.cpp
+++ b/tools/maat_redis_tool.cpp
@@ -308,14 +308,13 @@ int main(int argc, char * argv[])
printf("open %s failed.\n", json_file);
}
- ret = json2iris(json_buff, json_file, NULL, NULL, NULL, c, tmp_iris_path,
- sizeof(tmp_iris_path), NULL, NULL, NULL);
+ ret = json2iris(json_buff, json_file, c, tmp_iris_path, sizeof(tmp_iris_path), NULL, NULL, logger);
if (ret < 0) {
printf("Invalid json format.\n");
}
size_t total_line_cnt = 0;
- config_monitor_traverse(0, tmp_iris_path, NULL, count_line_num_cb, NULL, &total_line_cnt, NULL);
+ config_monitor_traverse(0, tmp_iris_path, NULL, count_line_num_cb, NULL, &total_line_cnt, logger);
printf("Serialize %s to %zu lines, write temp file to %s .\n", json_file, total_line_cnt, tmp_iris_path);
struct serial_rule *s_rule = ALLOC(struct serial_rule, total_line_cnt);
@@ -328,13 +327,13 @@ int main(int argc, char * argv[])
absolute_expire_time = server_time + timeout;
}
- config_monitor_traverse(0, tmp_iris_path, NULL, make_serial_rule, NULL, s_rule, NULL);
+ config_monitor_traverse(0, tmp_iris_path, NULL, make_serial_rule, NULL, s_rule, logger);
printf("Timeout = %lld\n", absolute_expire_time);
ret = 0;
int success_cnt = 0;
do {
- success_cnt = maat_cmd_write_rule(c, s_rule, total_line_cnt, server_time, NULL);
+ success_cnt = maat_cmd_write_rule(c, s_rule, total_line_cnt, server_time, logger);
} while(success_cnt < 0);
if (success_cnt != (int)total_line_cnt) {