From 30e6ef696754de41c6dd9f28afb1c17937a2efc2 Mon Sep 17 00:00:00 2001 From: Nathan Ward Date: Thu, 29 Oct 2015 01:46:29 +1300 Subject: [PATCH] ASN_GAUGE (SNMP-SMIv2 Gauge32) is unsigned, not signed. --- src/snmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/snmp.c b/src/snmp.c index e178d3a2..d4a29c7e 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -771,8 +771,7 @@ static value_t csnmp_value_list_to_value (struct variable_list *vl, int type, tmp_unsigned = (uint32_t) *vl->val.integer; tmp_signed = (int32_t) *vl->val.integer; - if ((vl->type == ASN_INTEGER) - || (vl->type == ASN_GAUGE)) + if ((vl->type == ASN_INTEGER)) prefer_signed = 1; DEBUG ("snmp plugin: Parsed int32 value is %"PRIu64".", tmp_unsigned); -- 2.30.2