Re: exec problem with 5.1

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Thu, 2006-03-16 at 10:08 +0000, Dave Shield wrote:
> On Wed, 2006-03-08 at 10:42 +0100, Tomasz Nowak wrote:
> > OK, so I have 2 bugs in 5.3.0.1 with extend command:
> > 
> > 1. If you put the OID, you don't get the nsExtendOutput2Table.
> > You only get nsExtendOutput1Table so no per-line results at all.
> 
> OK - I've managed to reproduce this bug.
> The fix is attached.

Except it wasn't of course :-(
Old age must be creeping up on me.

Trying again.

Dave
extend.diff (text/x-patch, 771 B)
--- extend.c.cln	2006-03-13 09:29:22.000000000 +0000
+++ extend.c	2006-03-15 18:14:18.000000000 +0000
@@ -1169,8 +1169,9 @@
              * now we've found the appropriate entry (and line),
              * we need to update the varbind OID ...
              */
-            memcpy( oid_buf, extend_out2_oid, sizeof(extend_out2_oid));
-            oid_len = OID_LENGTH(extend_out2_oid);
+            oid_len = ereg->oid_len;
+            memcpy( oid_buf, ereg->root_oid, oid_len*sizeof(oid));
+            oid_buf[ oid_len++ ] = 4;    /* nsExtendOutput2Table */
             oid_buf[ oid_len++ ] = 1;    /* nsExtendOutput2Entry */
             oid_buf[ oid_len++ ] = COLUMN_EXTOUT2_OUTLINE;
                                          /* string token index */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.