~ubuntu-branches/ubuntu/precise/net-snmp/precise

« back to all changes in this revision

Viewing changes to snmplib/parse.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-26 01:27:00 UTC
  • mfrom: (1.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091126012700-pox7w0a5j2x305h9
Tags: 5.4.2.1~dfsg-3ubuntu1
* Merge from debian testing.  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/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.
    (LP: #426813).
 * Dropped patches:
   - debian/patches/101-fix-ipalias.patch: Applied upstream.
   - debian/patches/99-fix-net-snmp-syslog.patch: Applied upstream.
   - debian/patches/99-fix-perl-counter-in-subagent.patch: Applied upstream.
   - ebian/patches/103-fix-ubuntu-lmsensors.patch: No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2889
2889
                 * Get right bracket 
2890
2890
                 */
2891
2891
                type = get_token(fp, token, MAXTOKEN);
2892
 
            } else if (type == LABEL)
 
2892
            } else if (type == LABEL) {
2893
2893
                np->parent = strdup(token);
 
2894
            } else {
 
2895
                free_node(np);
 
2896
                return NULL;
 
2897
            }
2894
2898
            break;
2895
2899
        case VARIABLES:
2896
2900
            np->varbinds = getVarbinds(fp, &np->varbinds);
3209
3213
        print_error("Expected DESCRIPTION", token, type);
3210
3214
        goto skip;
3211
3215
    }
3212
 
    type = get_token(fp, token, MAXTOKEN);
 
3216
    type = get_token(fp, quoted_string_buffer, MAXTOKEN);
3213
3217
    if (type != QUOTESTRING) {
3214
 
        print_error("Bad DESCRIPTION", token, type);
 
3218
        print_error("Bad DESCRIPTION", quoted_string_buffer, type);
3215
3219
        goto skip;
3216
3220
    }
3217
3221
    if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
3218
3222
                               NETSNMP_DS_LIB_SAVE_MIB_DESCRS)) {
3219
 
        np->description = strdup(token);
 
3223
        np->description = strdup(quoted_string_buffer);
3220
3224
    }
3221
3225
    type = get_token(fp, token, MAXTOKEN);
3222
3226
    if (type == REFERENCE) {
3223
 
        type = get_token(fp, token, MAXTOKEN);
 
3227
        type = get_token(fp, quoted_string_buffer, MAXTOKEN);
3224
3228
        if (type != QUOTESTRING) {
3225
 
            print_error("Bad REFERENCE", token, type);
 
3229
            print_error("Bad REFERENCE", quoted_string_buffer, type);
3226
3230
            goto skip;
3227
3231
        }
3228
 
        np->reference = strdup(token);
 
3232
        np->reference = strdup(quoted_string_buffer);
3229
3233
        type = get_token(fp, token, type);
3230
3234
    }
3231
3235
    while (type == SUPPORTS) {
3342
3346
                print_error("Expected DESCRIPTION", token, type);
3343
3347
                goto skip;
3344
3348
            }
3345
 
            type = get_token(fp, token, MAXTOKEN);
 
3349
            type = get_token(fp, quoted_string_buffer, MAXTOKEN);
3346
3350
            if (type != QUOTESTRING) {
3347
 
                print_error("Bad DESCRIPTION", token, type);
 
3351
                print_error("Bad DESCRIPTION", quoted_string_buffer, type);
3348
3352
                goto skip;
3349
3353
            }
3350
3354
            type = get_token(fp, token, MAXTOKEN);
4789
4793
                     */
4790
4794
                    closedir(dir2);
4791
4795
                } else {
4792
 
                    if ( add_mibfile( tmpstr, file->d_name, ip ))
 
4796
                    if ( !add_mibfile( tmpstr, file->d_name, ip ))
4793
4797
                        count++;
4794
4798
                }
4795
4799
              }