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. --- ChangeLog | 6 +++++- configure.in | 4 ++-- tools/rrdbot-get.c | 6 +++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff35012..f130d9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,13 @@ +0.9.1 [2008-07-07] + - Fix bug with table queries in rrdbot-get + - rrdbot-get now prints out unsigned integers properly. + 0.9 [2008-04-16] - Support failover between multiple agents. - Support table queries by looking up table indexes. - Major refactoring of internals. - Warn and ignore MIBs that we don't recognize. - - Support parsing strings into integers and floats + - Support parsing strings into integers and floats 0.8 [2007-07-16] diff --git a/configure.in b/configure.in index 26d4d4b..5aa00d5 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(rrdbot, 0.9, stef@memberwebs.com) -AM_INIT_AUTOMAKE(rrdbot, 0.9) +AC_INIT(rrdbot, 0.9.1, stef@memberwebs.com) +AM_INIT_AUTOMAKE(rrdbot, 0.9.1) LDFLAGS="$LDFLAGS -L/usr/local/lib" CFLAGS="$CFLAGS -I/usr/local/include" 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