~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to agent/agent_registry.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-12-08 14:59:50 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071208145950-u1tykhpw56nyzqik
Tags: 5.4.1~dfsg-4ubuntu1
* Merge from debian unstable.
* Remaining Ubuntu changes:
  - Remove stop links from rc0 and rc6
  - Munge Maintainer field as per spec.
* Ubuntu changes dropped:
  - Symlink common files between the packages, CDBS ought to handle that
    for us automatically.
* The latest Debian changes has dropped history from the changelog. Slot in
  the Ubuntu changes as best I can. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
      SNMP_FREE(a->variables);
86
86
    }
87
87
    SNMP_FREE(a->name_a);
 
88
    a->namelen = 0;
88
89
    SNMP_FREE(a->start_a);
 
90
    a->start_len = 0;
89
91
    SNMP_FREE(a->end_a);
 
92
    a->end_len = 0;
90
93
    SNMP_FREE(a->label_a);
91
94
    netsnmp_handler_registration_free(a->reginfo);
 
95
    a->reginfo = NULL;
92
96
    SNMP_FREE(a);
93
97
  }
94
98
}
528
532
        
529
533
            if (next && (next->namelen  == new_sub->namelen) &&
530
534
                (next->priority == new_sub->priority)) {
531
 
                netsnmp_assert("registration" != "duplicate");
 
535
                netsnmp_assert(!"registration != duplicate"); /* always false */
532
536
                return MIB_DUPLICATE_REGISTRATION;
533
537
            }
534
538
 
622
626
        snmp_log(LOG_WARNING,"context passed during registration does not "
623
627
                 "equal the reginfo contextName! ('%s' != '%s')\n",
624
628
                 context, reginfo->contextName);
625
 
        netsnmp_assert("register context" == "reginfo->contextName");
 
629
        netsnmp_assert(!"register context == reginfo->contextName"); /* always false */
626
630
    }
627
631
 
628
632
    /*  Create the new subtree node being registered.  */
1216
1220
    /*
1217
1221
     * check for v1 and counter64s, since snmpv1 doesn't support it 
1218
1222
     */
1219
 
#ifndef DISABLE_SNMPV1
 
1223
#ifndef NETSNMP_DISABLE_SNMPV1
1220
1224
    if (pdu->version == SNMP_VERSION_1 && type == ASN_COUNTER64) {
1221
1225
        return VACM_NOTINVIEW;
1222
1226
    }
1233
1237
    view_parms.check_subtree = 0;
1234
1238
 
1235
1239
    switch (pdu->version) {
1236
 
#ifndef DISABLE_SNMPV1
 
1240
#ifndef NETSNMP_DISABLE_SNMPV1
1237
1241
    case SNMP_VERSION_1:
1238
1242
#endif
1239
 
#ifndef DISABLE_SNMPV2C
 
1243
#ifndef NETSNMP_DISABLE_SNMPV2C
1240
1244
    case SNMP_VERSION_2c:
1241
1245
#endif
1242
1246
    case SNMP_VERSION_3:
1268
1272
    }
1269
1273
 
1270
1274
    switch (pdu->version) {
1271
 
#ifndef DISABLE_SNMPV1
 
1275
#ifndef NETSNMP_DISABLE_SNMPV1
1272
1276
    case SNMP_VERSION_1:
1273
1277
#endif
1274
 
#ifndef DISABLE_SNMPV2C
 
1278
#ifndef NETSNMP_DISABLE_SNMPV2C
1275
1279
    case SNMP_VERSION_2c:
1276
1280
#endif
1277
1281
    case SNMP_VERSION_3:
1305
1309
    }
1306
1310
 
1307
1311
    switch (pdu->version) {
1308
 
#ifndef DISABLE_SNMPV1
 
1312
#ifndef NETSNMP_DISABLE_SNMPV1
1309
1313
    case SNMP_VERSION_1:
1310
1314
#endif
1311
 
#ifndef DISABLE_SNMPV2C
 
1315
#ifndef NETSNMP_DISABLE_SNMPV2C
1312
1316
    case SNMP_VERSION_2c:
1313
1317
#endif
1314
1318
    case SNMP_VERSION_3:
1458
1462
    lookup_cache *lookup_cache = NULL;
1459
1463
    netsnmp_subtree *myptr = NULL, *previous = NULL;
1460
1464
    int cmp = 1;
1461
 
    int ll_off = 0;
 
1465
    size_t ll_off = 0;
1462
1466
 
1463
1467
    if (subtree) {
1464
1468
        myptr = subtree;