summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2008-07-08 14:53:59 +0000
committerStef Walter <stef@memberwebs.com>2008-07-08 14:53:59 +0000
commit723785873edd5fc3c00fefc8894a2c2085676313 (patch)
tree6d2572cb730f9b3f8444690c2a7afeafdee22368 /tools
parent382f51431521d56f013231c1f657fee577072bcd (diff)
- Fix bug with table queries in rrdbot-get
- rrdbot-get now prints out unsigned integers properly.
Diffstat (limited to 'tools')
-rw-r--r--tools/rrdbot-get.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/rrdbot-get.c b/tools/rrdbot-get.c
index e6f52c5..0f84578 100644
--- a/tools/rrdbot-get.c
+++ b/tools/rrdbot-get.c
@@ -213,10 +213,10 @@ print_result (struct snmp_value* value)
case SNMP_SYNTAX_COUNTER:
case SNMP_SYNTAX_GAUGE:
case SNMP_SYNTAX_TIMETICKS:
- printf ("%d\n", value->v.uint32);
+ printf ("%u\n", value->v.uint32);
break;
case SNMP_SYNTAX_COUNTER64:
- printf ("%lld\n", value->v.counter64);
+ printf ("%llu\n", value->v.counter64);
break;
case SNMP_SYNTAX_OCTETSTRING:
t = xcalloc (value->v.octetstring.len + 1);
@@ -354,7 +354,7 @@ process_query (void)
}
/* The last one is the table index */
- sub = value.var.subs[value.var.len];
+ sub = value.var.subs[value.var.len - 1];
/* Build up the field OID */
memcpy (&value.var, &ctx.request_oid, sizeof (value.var));