From c661a76d68b5e6f8d8b592676b8c042348b2a6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Aleksi=C5=84ski?= Date: Thu, 1 Jul 2021 06:38:15 +0000 Subject: [PATCH] snmp: Updated return data format --- snmp/rdt-agentx.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snmp/rdt-agentx.pl b/snmp/rdt-agentx.pl index 66115363..1ec1cca3 100755 --- a/snmp/rdt-agentx.pl +++ b/snmp/rdt-agentx.pl @@ -474,7 +474,7 @@ sub handle_core_prop { if (MODE_GET == $mode) { if (exists $data_core_prop{$oid}) { - $request->setValue(ASN_UNSIGNED, $data_core_prop{$oid}); + $request->setValue(ASN_UNSIGNED, "$data_core_prop{$oid}"); } return; @@ -485,7 +485,7 @@ sub handle_core_prop { $_ = NetSNMP::OID->new($_); if ($oid < $_) { $request->setOID($_); - $request->setValue(ASN_UNSIGNED, $data_core_prop{$_}); + $request->setValue(ASN_UNSIGNED, "$data_core_prop{$_}"); last; } } @@ -638,7 +638,7 @@ sub handle_mon_ctrl { if (MODE_GET == $mode) { if (exists $data_mon_ctrl{$oid}) { - $request->setValue(ASN_UNSIGNED, $data_mon_ctrl{$oid}); + $request->setValue(ASN_UNSIGNED, "$data_mon_ctrl{$oid}"); } return; @@ -649,7 +649,7 @@ sub handle_mon_ctrl { $_ = NetSNMP::OID->new($_); if ($oid < $_) { $request->setOID($_); - $request->setValue(ASN_UNSIGNED, $data_mon_ctrl{$_}); + $request->setValue(ASN_UNSIGNED, "$data_mon_ctrl{$_}"); last; } }