diff options
author | Stef Walter <stef@memberwebs.com> | 2008-07-08 14:53:59 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-07-08 14:53:59 +0000 |
commit | 723785873edd5fc3c00fefc8894a2c2085676313 (patch) | |
tree | 6d2572cb730f9b3f8444690c2a7afeafdee22368 | |
parent | 382f51431521d56f013231c1f657fee577072bcd (diff) |
- Fix bug with table queries in rrdbot-get
- rrdbot-get now prints out unsigned integers properly.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | tools/rrdbot-get.c | 6 |
3 files changed, 10 insertions, 6 deletions
@@ -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)); |