~ubuntu-branches/ubuntu/wily/net-snmp/wily-proposed

« back to all changes in this revision

Viewing changes to local/mib2c.iterate.conf

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-28 14:59:36 UTC
  • mfrom: (1.2.3 upstream) (1.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100628145936-cbiallic69pn044g
Tags: 5.4.3~dfsg-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/snmpd.postinst: source debconf before doing work, LP: #589056
  - debian/snmp.preinst, debian/snmp.prerm: kill any/all processes owned by
    snmp user before install/uninstall, LP: #573391
  - Add apport hook (LP: #533603):
  - debian/{snmp,snmpd}.apport: Added.
  - debian/control: Build-depends on dh-apport.
  - debian/rules: 
    + Add --with apport.
    + override_dh_apport to install hook on snmpd package only.
 * Dropped patches:
   - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
@open ${name}.h@
6
6
/*
7
7
 * Note: this file originally auto-generated by mib2c using
8
 
 *  $Id: mib2c.iterate.conf 15999 2007-03-25 22:32:02Z dts12 $
 
8
 *  $Id: mib2c.iterate.conf 17821 2009-11-11 09:00:00Z dts12 $
9
9
 */
10
10
#ifndef $name.uc_H
11
11
#define $name.uc_H
37
37
@open ${name}.c@
38
38
/*
39
39
 * Note: this file originally auto-generated by mib2c using
40
 
 *  $Id: mib2c.iterate.conf 15999 2007-03-25 22:32:02Z dts12 $
 
40
 *  $Id: mib2c.iterate.conf 17821 2009-11-11 09:00:00Z dts12 $
41
41
 */
42
42
 
43
43
#include <net-snmp/net-snmp-config.h>
220
220
    char buf[STRMAX];
221
221
 
222
222
    fp = fopen( "/data/for/${i}", "r" );
 
223
    if ( !fp ) {
 
224
        return -1;
 
225
    }
223
226
    while ( fgets( buf, STRMAX, fp )) {
224
227
        this = SNMP_MALLOC_TYPEDEF( struct ${i}_entry );
225
228
        /* Unpick 'buf' and populate 'this' */
228
231
        ${i}_head = this;    /* Iterate helper is fine with unordered lists! */
229
232
    }
230
233
    fclose(fp);
 
234
    return 0;  /* OK */
231
235
}
232
236
 
233
 
int
 
237
void
234
238
${i}_free( netsnmp_cache *cache, void *vmagic ) {
235
239
    struct ${i}_entry *this, *that;
236
240