修改maat_json笔误,修复redis busy时reply没有释放的bug。

This commit is contained in:
zhengchao
2017-09-10 18:30:44 +08:00
parent 9396bb9e63
commit 819d346b31
4 changed files with 19 additions and 15 deletions

View File

@@ -368,6 +368,8 @@ int get_rm_key_list(unsigned int version,redisContext *c,struct serial_rule_t**
if(reply->type==REDIS_REPLY_NIL||reply->type==REDIS_REPLY_ERROR) if(reply->type==REDIS_REPLY_NIL||reply->type==REDIS_REPLY_ERROR)
{ {
MESA_handle_runtime_log(logger, RLOG_LV_FATAL, maat_redis_monitor,"GET MAAT_VERSION failed, maybe Redis is busy."); MESA_handle_runtime_log(logger, RLOG_LV_FATAL, maat_redis_monitor,"GET MAAT_VERSION failed, maybe Redis is busy.");
freeReplyObject(reply);
reply=NULL;
return -1; return -1;
} }
} }

View File

@@ -676,8 +676,10 @@ int write_compile_rule(cJSON *compile,struct iris_description_t *p_iris,void * l
compile_cmd[cmd_cnt].json_type=cJSON_Number; compile_cmd[cmd_cnt].json_type=cJSON_Number;
cmd_cnt++; cmd_cnt++;
compile_cmd[cmd_cnt].json_string="effective_rage"; compile_cmd[cmd_cnt].json_string="effective_range";
compile_cmd[cmd_cnt].json_type=cJSON_Number; compile_cmd[cmd_cnt].json_type=cJSON_Number;
compile_cmd[cmd_cnt].empty_allowed=1;
compile_cmd[cmd_cnt].default_int=0;
cmd_cnt++; cmd_cnt++;
compile_cmd[cmd_cnt].json_string="user_region"; compile_cmd[cmd_cnt].json_string="user_region";

View File

@@ -8,7 +8,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "anything", "user_region": "anything",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -74,7 +74,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "anything", "user_region": "anything",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -102,7 +102,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "anything", "user_region": "anything",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -128,7 +128,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "anything", "user_region": "anything",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -168,7 +168,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "anything", "user_region": "anything",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -194,7 +194,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "anything", "user_region": "anything",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -222,7 +222,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "utf8_中文", "user_region": "utf8_中文",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -249,7 +249,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "utf8_维语", "user_region": "utf8_维语",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -276,7 +276,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "utf8_维语2", "user_region": "utf8_维语2",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -303,7 +303,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "string\\bunescape", "user_region": "string\\bunescape",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -330,7 +330,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "table_conjunction_test_part1", "user_region": "table_conjunction_test_part1",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -357,7 +357,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "table_conjunction_test_part2", "user_region": "table_conjunction_test_part2",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [
@@ -384,7 +384,7 @@
"action": 1, "action": 1,
"do_blacklist": 1, "do_blacklist": 1,
"do_log": 1, "do_log": 1,
"effective_rage": 0, "effective_range": 0,
"user_region": "anything", "user_region": "anything",
"is_valid": "yes", "is_valid": "yes",
"groups": [ "groups": [

View File

@@ -499,7 +499,7 @@ void test_set_cmd_line(Maat_feather_t feather)
char table_line[TEST_CMD_LINE_NUM][128]; char table_line[TEST_CMD_LINE_NUM][128];
int ret=0,i=0; int ret=0,i=0;
memset(&line_rule,0,sizeof(line_rule)); memset(&line_rule,0,sizeof(line_rule));
for(i=0;i<4;i++) for(i=0;i<TEST_CMD_LINE_NUM;i++)
{ {
line_rule[i].label_id=0; line_rule[i].label_id=0;
line_rule[i].rule_id=(int)Maat_cmd_incrby(feather,"TEST_PLUG_SEQ", 1); line_rule[i].rule_id=(int)Maat_cmd_incrby(feather,"TEST_PLUG_SEQ", 1);