Re: still problems with exec and extend?
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2006-03-30 at 16:39 +0200, Kai wrote: > In the archives I read that the new extend is the suggested way to run > scripts locally, but it doesn't work for us either: > From what I can read in the output, it seems that the relocation of the mib > to our oidspace isn't possible at all, as half of the info gets lost > (SNMPv2-SMI::enterprises.7460.1.14.4 is missing). That problem was fixed by a patch listed in the thread "exec problem with 5.1" a couple of weeks ago. It's a very small fix, so I'll append the patch again. Dave
extend.diff
(text/x-patch, 615 B)
--- extend.c.cln 2006-03-15 18:14:18.000000000 +0000
+++ extend.c 2006-03-21 08:16:39.000000000 +0000
@@ -341,7 +341,12 @@
extension->row = row;
netsnmp_table_row_add_index( row, ASN_OCTET_STR,
exec_name, strlen(exec_name));
- netsnmp_table_data_add_row( dinfo, row);
+ if ( netsnmp_table_data_add_row( dinfo, row) != SNMPERR_SUCCESS ) {
+ /* _free_extension( extension, ereg ); */
+ SNMP_FREE( extension ); /* Probably not sufficient */
+ SNMP_FREE( row );
+ return NULL;
+ }
ereg->num_entries++;
/*