From 723785873edd5fc3c00fefc8894a2c2085676313 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 8 Jul 2008 14:53:59 +0000 Subject: - Fix bug with table queries in rrdbot-get - rrdbot-get now prints out unsigned integers properly. --- tools/rrdbot-get.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/rrdbot-get.c') 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)); -- cgit v1.2.3