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

« back to all changes in this revision

Viewing changes to snmplib/snmp_client.c

  • 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:
580
580
 * The command is set to the input command and the reqid, errstat, and
581
581
 * errindex are set to default values.
582
582
 * If the error status didn't indicate an error, the error index didn't
583
 
 * indicate a variable, the pdu wasn't a get response message, or there
 
583
 * indicate a variable, the pdu wasn't a get response message, the
 
584
 * marked variable was not present in the initial request, or there
584
585
 * would be no remaining variables, this function will return 0.
585
586
 * If everything was successful, a pointer to the fixed cloned pdu will
586
587
 * be returned.
593
594
    if ((pdu->command != SNMP_MSG_RESPONSE)
594
595
        || (pdu->errstat == SNMP_ERR_NOERROR)
595
596
        || (0 == pdu->variables)
 
597
        || (pdu->errindex > snmp_varbind_len(pdu))
596
598
        || (pdu->errindex <= 0)) {
597
599
        return 0;               /* pre-condition tests fail */
598
600
    }
642
644
{
643
645
    size_t          len = sizeof(oid) * name_length;
644
646
 
645
 
    if (vp->name != vp->name_loc && vp->name != NULL &&
646
 
        vp->name_length > (sizeof(vp->name_loc) / sizeof(oid))) {
 
647
    if (vp->name != vp->name_loc && vp->name != NULL) {
647
648
        /*
648
649
         * Probably previously-allocated "big storage".  Better free it
649
650
         * else memory leaks possible.  
1042
1043
            }
1043
1044
        }
1044
1045
 
1045
 
        if ( ss->flags &= SNMP_FLAGS_RESP_CALLBACK ) {
 
1046
        if ( ss->flags & SNMP_FLAGS_RESP_CALLBACK ) {
1046
1047
            void (*cb)(void);
1047
1048
            cb = ss->myvoid;
1048
1049
            cb();        /* Used to invoke 'netsnmp_check_outstanding_agent_requests();'