diff options
author | Hideki Yamane <henrich@debian.org> | 2013-04-11 10:21:36 +0900 |
---|---|---|
committer | Hideki Yamane <henrich@debian.org> | 2013-04-11 10:21:36 +0900 |
commit | 9c3c74a98221880a5804fd58fe541c8b672995d2 (patch) | |
tree | 009bf8fd68af6bb1129e07dd8c1ed205010d81f8 /local/mib2c.int_watch.conf | |
parent | e30beeedd5cbe6f72008c32122b3b8b617fd5ab2 (diff) | |
download | pkg-net-snmp-9c3c74a98221880a5804fd58fe541c8b672995d2.tar.gz |
Imported Upstream version 5.7.2~dfsg
Diffstat (limited to 'local/mib2c.int_watch.conf')
-rw-r--r-- | local/mib2c.int_watch.conf | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/local/mib2c.int_watch.conf b/local/mib2c.int_watch.conf index 5804a74..ecc5d10 100644 --- a/local/mib2c.int_watch.conf +++ b/local/mib2c.int_watch.conf @@ -7,7 +7,7 @@ @open ${name}.h@ /* * Note: this file originally auto-generated by mib2c using - * $Id: mib2c.int_watch.conf 13957 2005-12-20 15:33:08Z tanders $ + * $Id$ */ #ifndef $name.uc_H #define $name.uc_H @@ -22,7 +22,7 @@ void init_$name(void); @open ${name}.c@ /* * Note: this file originally auto-generated by mib2c using - * $Id: mib2c.int_watch.conf 13957 2005-12-20 15:33:08Z tanders $ + * $Id$ */ #include <net-snmp/net-snmp-config.h> @@ -50,12 +50,12 @@ void init_${name}(void) { netsnmp_handler_registration *reg; - netsnmp_watcher_info *winfo; @foreach $i scalar@ @if !$i.needlength@ - static oid ${i}_oid[] = { $i.commaoid }; + const oid ${i}_oid[] = { $i.commaoid }; @end@ + static netsnmp_watcher_info ${i}_winfo; @end@ /* @@ -92,10 +92,9 @@ init_${name}(void) @else@ HANDLER_CAN_RONLY); @end@ - winfo = netsnmp_create_watcher_info( - &$i, sizeof($i.decl), - $i.type, WATCHER_FIXED_SIZE); - if (netsnmp_register_watched_scalar( reg, winfo ) < 0 ) { + netsnmp_init_watcher_info(&${i}_winfo, &$i, sizeof($i.decl), + $i.type, WATCHER_FIXED_SIZE); +if (netsnmp_register_watched_scalar( reg, &${i}_winfo ) < 0 ) { snmp_log( LOG_ERR, "Failed to register watched $i" ); } |