diff options
author | Andrejs Kozlovs <andrejs.kozlovs@zabbix.com> | 2021-08-26 15:29:59 +0300 |
---|---|---|
committer | Andrejs Kozlovs <andrejs.kozlovs@zabbix.com> | 2021-08-26 15:29:59 +0300 |
commit | 8c27d3e63d5d4df65ce47a4029c8bd34801014ec (patch) | |
tree | 18a338a74a5f686d639371e118035eb2232d1160 /src/libs/zbxaudit/audit_item.c | |
parent | a7caf32c4e05c934aa057c3beb4e88efb2b829c1 (diff) |
........S. [ZBXNEXT-6830] fixed delete audit
Diffstat (limited to 'src/libs/zbxaudit/audit_item.c')
-rw-r--r-- | src/libs/zbxaudit/audit_item.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libs/zbxaudit/audit_item.c b/src/libs/zbxaudit/audit_item.c index b6512f5a991..99daaf4c6ef 100644 --- a/src/libs/zbxaudit/audit_item.c +++ b/src/libs/zbxaudit/audit_item.c @@ -310,13 +310,25 @@ PREPARE_AUDIT_ITEM_UPDATE(key, const char*, string) #undef ONLY_LLD_RULE #undef IT_OR_ITP -static void zbx_audit_item_create_entry_for_delete(zbx_uint64_t id, char *name, int resource_type) +/****************************************************************************** + * * + * Function: zbx_audit_item_create_entry_for_delete * + * * + * Parameters: id - [IN] resource id * + * name - [IN] resource name * + * flag - [IN] resource flag * + * * + ******************************************************************************/ +void zbx_audit_item_create_entry_for_delete(zbx_uint64_t id, char *name, int flag) { + int resource_type; zbx_audit_entry_t local_audit_item_entry, **found_audit_item_entry; zbx_audit_entry_t *local_audit_item_entry_x = &local_audit_item_entry; RETURN_IF_AUDIT_OFF(); + resource_type = item_flag_to_resource_type(flag); + local_audit_item_entry.id = id; found_audit_item_entry = (zbx_audit_entry_t**)zbx_hashset_search(zbx_get_audit_hashset(), @@ -357,7 +369,7 @@ void DBselect_delete_for_item(const char *sql, zbx_vector_uint64_t *ids) { ZBX_STR2UINT64(id, row[0]); zbx_vector_uint64_append(ids, id); - zbx_audit_item_create_entry_for_delete(id, row[1], item_flag_to_resource_type(atoi(row[2]))); + zbx_audit_item_create_entry_for_delete(id, row[1], atoi(row[2])); } DBfree_result(result); |