From 6601e29e596166efe976c6a3be92ee55b816cc23 Mon Sep 17 00:00:00 2001 From: Andris Zeila Date: Tue, 8 Nov 2022 15:21:22 +0200 Subject: ........S. [ZBX-19813] fixed snmp interface creation when copying host prototypes during template linking --- src/libs/zbxdbhigh/host.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/zbxdbhigh/host.c b/src/libs/zbxdbhigh/host.c index 9585b7d4085..0092ebcc04c 100644 --- a/src/libs/zbxdbhigh/host.c +++ b/src/libs/zbxdbhigh/host.c @@ -3672,9 +3672,7 @@ static void DBhost_prototypes_save(const zbx_vector_ptr_t *host_prototypes, zbx_audit_host_prototype_update_json_add_interfaces(host_prototype->hostid, interface->interfaceid, interface->main, interface->type, interface->useip, interface->ip, interface->dns, atoi(interface->port)); - } - else - { + if (INTERFACE_TYPE_SNMP == interface->type) { zbx_db_insert_add_values(&db_insert_snmp, interface->interfaceid, -- cgit v1.2.3