additional adjustments for Zabbix 7.x

This commit is contained in:
Jörg Deckert 2025-01-23 15:06:40 +01:00
parent 5cab7886fb
commit 2d92d87f40
1 changed files with 8 additions and 7 deletions

View File

@ -24,6 +24,7 @@
#include "zbxsysinfo.h"
#include "zbxalgo.h"
#include "zbxjson.h"
#include "zbxstr.h"
#define SNMP_NO_DEBUGGING /* disabling debugging messages from Net-SNMP library */
@ -1096,7 +1097,7 @@ int lldpmod_snmpwalk_getrem_cb(void *arg, const netsnmp_variable_list *var)
{
char **msg;
msg = GET_MSG_RESULT(getrem_data->result);
msg = ZBX_GET_MSG_RESULT(getrem_data->result);
zabbix_log(LOG_LEVEL_DEBUG, "%s: cannot get index='%lu', rem_index='%lu' value: %s", MODULE_NAME,
(unsigned long)getrem_data->index, (unsigned long)getrem_data->rem_index, NULL != msg && NULL != *msg ? *msg : "(null)");
@ -1149,9 +1150,9 @@ int lldpmod_snmpwalk_discovery_cb(void *arg, const netsnmp_variable_list *var)
return ret;
}
init_result(&snmp_result);
zbx_init_agent_result(&snmp_result);
if (SUCCEED == lldpmod_snmp_set_result(var, &snmp_result, data->request.res_types[data->num], data->request.dump_flags[data->num]) &&
NULL != GET_STR_RESULT(&snmp_result))
NULL != ZBX_GET_STR_RESULT(&snmp_result))
{
if (NULL == (obj = (lldpmod_snmp_object_t *)zbx_hashset_search(&data->objects, &index)))
{
@ -1222,7 +1223,7 @@ int lldpmod_snmpwalk_discovery_cb(void *arg, const netsnmp_variable_list *var)
else
{
char **msg;
msg = GET_MSG_RESULT(&snmp_result);
msg = ZBX_GET_MSG_RESULT(&snmp_result);
if (data->request.key_types[data->num] == KEY_TYPE_LOC)
zabbix_log(LOG_LEVEL_DEBUG, "%s: cannot get index '%lu' string value: %s", MODULE_NAME,
(unsigned long)index, NULL != msg && NULL != *msg ? *msg : "(null)");
@ -1232,7 +1233,7 @@ int lldpmod_snmpwalk_discovery_cb(void *arg, const netsnmp_variable_list *var)
}
free_result(&snmp_result);
zbx_free_agent_result(&snmp_result);
return ret;
}
@ -1595,7 +1596,7 @@ exit:
}
char **msg;
msg = GET_MSG_RESULT(result);
msg = ZBX_GET_MSG_RESULT(result);
zabbix_log(LOG_LEVEL_DEBUG, "%s: getting SNMP values failed: %s", MODULE_NAME, NULL != msg && NULL != *msg ? *msg : "(null)");
ret = SYSINFO_RET_FAIL;
@ -1846,7 +1847,7 @@ exit:
}
char **msg;
msg = GET_MSG_RESULT(result);
msg = ZBX_GET_MSG_RESULT(result);
zabbix_log(LOG_LEVEL_DEBUG, "%s: getting SNMP values failed: %s", MODULE_NAME, NULL != msg && NULL != *msg ? *msg : "(null)");
ret = SYSINFO_RET_FAIL;