rule sort support priority
This commit is contained in:
@@ -138,7 +138,8 @@ int write_json_to_redis(const char *json_filename, char *redis_ip, int redis_por
|
||||
int rule_table_set_line(struct maat *maat_inst, const char *table_name,
|
||||
enum maat_operation op, const char *rule_uuid_str,
|
||||
struct maat_cmd_and_condition and_conditions[],
|
||||
int condition_num, const char *action_para_str, int expire_after)
|
||||
int condition_num, const char *action_para_str,
|
||||
int priority, int expire_after)
|
||||
{
|
||||
cJSON *json_root = cJSON_CreateObject();
|
||||
|
||||
@@ -177,6 +178,8 @@ int rule_table_set_line(struct maat *maat_inst, const char *table_name,
|
||||
cJSON_AddStringToObject(json_root, "action_parameter", action_para_str);
|
||||
}
|
||||
|
||||
cJSON_AddNumberToObject(json_root, "priority", priority);
|
||||
|
||||
char *json_str = cJSON_PrintUnformatted(json_root);
|
||||
|
||||
struct maat_cmd_line line_rule;
|
||||
|
||||
Reference in New Issue
Block a user