On Wed, May 25, 2011 at 07:12:24AM -0700, Wes Hardaker wrote:
>
> The following patch was created by Bart to fix a few places where the
> OID printing is incorrect. Should this go into 5.6.1.1 too?
In principle, +1, in practice -1.
NETSNMP_PRIo has the value "l" so this sets the format string to e.g. %l\n.
Now, I think the patch is OK if the "d"'s are retained, or, preferrably,
changed to "u"'s.
> Index: agent/mibgroup/host/data_access/swinst.c
> ===================================================================
> --- agent/mibgroup/host/data_access/swinst.c (revision 20448)
> +++ agent/mibgroup/host/data_access/swinst.c (revision 20449)
> @@ -163,7 +163,8 @@
> void
> netsnmp_swinst_entry_free(netsnmp_swinst_entry *entry)
> {
> - DEBUGMSGTL(("swinst:entry:free", "index %d\n",entry->swIndex));
> + DEBUGMSGTL(("swinst:entry:free", "index %" NETSNMP_PRIo "\n",
> + entry->swIndex));
>
> free(entry);
> }
> Index: agent/mibgroup/tunnel/tunnel.c
> ===================================================================
> --- agent/mibgroup/tunnel/tunnel.c (revision 20448)
> +++ agent/mibgroup/tunnel/tunnel.c (revision 20449)
> @@ -418,7 +418,7 @@
> */
> for (tunnel = tunnels; tunnel; tunnel = tunnel->next) {
> DEBUGMSG(("tunnel",
> - "updateTunnels(): updating %s (index=%d)\n",
> + "updateTunnels(): updating %s (index=%" NETSNMP_PRIo ")\n",
> tunnel->ifname, tunnel->ifindex));
> updateTunnel(tunnel);
> }
> @@ -464,7 +464,8 @@
> last_tunnel = tunnel;
>
> DEBUGMSG(("tunnel",
> - "updateTunnels(): added %s (index=%d state=%d)\n",
> + "updateTunnels(): added %s (index=%" NETSNMP_PRIo
> + " state=%d)\n",
> tunnel->ifname, tunnel->ifindex, tunnel->active));
> }
> if (type == 0)
> @@ -485,8 +486,8 @@
> if (tunnel->ifindex == index) {
> if (!tunnel->active)
> break;
> - DEBUGMSG(("tunnel",
> - "%s (index=%d)\n", tunnel->ifname, tunnel->ifindex));
> + DEBUGMSG(("tunnel", "%s (index=%" NETSNMP_PRIo ")\n",
> + tunnel->ifname, tunnel->ifindex));
> return tunnel;
> }
> }
> @@ -507,8 +508,8 @@
> if (tunnel->ifindex > index) {
> if (!tunnel->active)
> continue;
> - DEBUGMSG(("tunnel",
> - "%s (index=%d)\n", tunnel->ifname, tunnel->ifindex));
> + DEBUGMSG(("tunnel", "%s (index=%" NETSNMP_PRIo ")\n",
> + tunnel->ifname, tunnel->ifindex));
> return tunnel;
> }
> }
> @@ -551,8 +552,8 @@
> (*length) - tunnel_len - 3)) {
> if (!tunnel->active)
> break;
> - DEBUGMSG(("tunnel",
> - "%s (index=%d)\n", tunnel->ifname, tunnel->ifindex));
> + DEBUGMSG(("tunnel", "%s (index=%" NETSNMP_PRIo ")\n",
> + tunnel->ifname, tunnel->ifindex));
> return tunnel;
> }
> }
> @@ -595,8 +596,7 @@
> }
>
> if (last_tunnel) {
> - DEBUGMSG(("tunnel",
> - "%s (index=%d)\n",
> + DEBUGMSG(("tunnel", "%s (index=%" NETSNMP_PRIo ")\n",
> last_tunnel->ifname, last_tunnel->ifindex));
> } else {
> DEBUGMSG(("tunnel", "NONE\n"));
>
> --
> Wes Hardaker
> Please mail all replies to [email protected]
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> Net-snmp-coders mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders