TSG-22707 tfe adapts to maat interface changes
This commit is contained in:
@@ -356,21 +356,21 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg)
|
||||
}
|
||||
|
||||
int j=0, enable_monit=0;
|
||||
int monit_config_id[16]={0};
|
||||
char *monit_config_id[16]={0};
|
||||
for(size_t i=0; i<log_msg->result_num; i++)
|
||||
{
|
||||
if(log_msg->result[i].action == LG_ACTION_MONIT)
|
||||
{
|
||||
monit_config_id[j]=log_msg->result[i].config_id;
|
||||
monit_config_id[j]=log_msg->result[i].config_uuid_string;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
for(size_t i=0; i<log_msg->result_num; i++)
|
||||
{
|
||||
TFE_LOG_DEBUG(handle->local_logger, "URL: %s, policy_id: %lld, service: %d, do_log:%d",
|
||||
TFE_LOG_DEBUG(handle->local_logger, "URL: %s, policy_id: %s, service: %d, do_log:%d",
|
||||
http->req->req_spec.url,
|
||||
log_msg->result[i].config_id,
|
||||
log_msg->result[i].config_uuid_string,
|
||||
log_msg->result[i].service_id,
|
||||
log_msg->result[i].do_log);
|
||||
|
||||
@@ -385,17 +385,17 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg)
|
||||
}
|
||||
|
||||
cJSON *proxy_rule_list=NULL;
|
||||
int config_id[1]={0};
|
||||
char *config_id[1]={0};
|
||||
per_hit_obj=cJSON_Duplicate(common_obj, 1);
|
||||
if(log_msg->result[i].action == LG_ACTION_MONIT)
|
||||
{
|
||||
proxy_rule_list = cJSON_CreateIntArray(monit_config_id, j);
|
||||
proxy_rule_list = cJSON_CreateStringArray((const char **)monit_config_id, j);
|
||||
enable_monit=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
config_id[0]=log_msg->result[i].config_id;
|
||||
proxy_rule_list = cJSON_CreateIntArray(config_id, 1);
|
||||
config_id[0]=log_msg->result[i].config_uuid_string;
|
||||
proxy_rule_list = cJSON_CreateStringArray((const char **)config_id, 1);
|
||||
}
|
||||
cJSON_AddItemToObject(per_hit_obj, "proxy_rule_list", proxy_rule_list);
|
||||
cJSON_AddNumberToObject(per_hit_obj, "vsys_id", log_msg->result[i].vsys_id);
|
||||
|
||||
Reference in New Issue
Block a user