diff options
Diffstat (limited to 'src/libs/zbxaudit/audit_ha.c')
-rw-r--r-- | src/libs/zbxaudit/audit_ha.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libs/zbxaudit/audit_ha.c b/src/libs/zbxaudit/audit_ha.c index 511f0123716..26fd7f2290e 100644 --- a/src/libs/zbxaudit/audit_ha.c +++ b/src/libs/zbxaudit/audit_ha.c @@ -30,12 +30,14 @@ void zbx_audit_ha_create_entry(int audit_action, const char *nodeid, const char local_audit_entry.id = 0; local_audit_entry.cuid = (char *)nodeid; + local_audit_entry.id_table = AUDIT_HA_NODE_ID; if (NULL == zbx_hashset_search(zbx_get_audit_hashset(), &plocal_audit_entry)) { zbx_audit_entry_t *new_entry; - new_entry = zbx_audit_entry_init_cuid(nodeid, name, audit_action, AUDIT_RESOURCE_HA_NODE); + new_entry = zbx_audit_entry_init_cuid(nodeid, AUDIT_HA_NODE_ID, name, audit_action, + AUDIT_RESOURCE_HA_NODE); zbx_hashset_insert(zbx_get_audit_hashset(), &new_entry, sizeof(new_entry)); } } @@ -46,7 +48,7 @@ void zbx_audit_ha_add_create_fields(const char *nodeid, const char *name, int st RETURN_IF_AUDIT_OFF(); - entry = zbx_audit_get_entry(0, nodeid); + entry = zbx_audit_get_entry(0, nodeid, AUDIT_HA_NODE_ID); zbx_audit_entry_append_string(entry, AUDIT_ACTION_ADD, ZBX_AUDIT_HA_NODEID, nodeid); zbx_audit_entry_append_string(entry, AUDIT_ACTION_ADD, ZBX_AUDIT_HA_NAME, name); @@ -60,7 +62,7 @@ void zbx_audit_ha_update_field_string(const char *nodeid, const char *key, const RETURN_IF_AUDIT_OFF(); - entry = zbx_audit_get_entry(0, nodeid); + entry = zbx_audit_get_entry(0, nodeid, AUDIT_HA_NODE_ID); zbx_audit_entry_append_string(entry, AUDIT_ACTION_UPDATE, key, old_value, new_value); } @@ -70,7 +72,7 @@ void zbx_audit_ha_update_field_int(const char *nodeid, const char *key, int old_ RETURN_IF_AUDIT_OFF(); - entry = zbx_audit_get_entry(0, nodeid); + entry = zbx_audit_get_entry(0, nodeid, AUDIT_HA_NODE_ID); zbx_audit_entry_append_int(entry, AUDIT_ACTION_UPDATE, key, old_value, new_value); } |