Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Is not working due to some bugs #1

Open
GoogleCodeExporter opened this issue Jul 20, 2015 · 2 comments
Open

Is not working due to some bugs #1

GoogleCodeExporter opened this issue Jul 20, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Calling SNMP::trap() is not working

What version of the product are you using? On what operating system?
Debian, Lenny

Please provide any additional information below.
Bugs in SNMP.php

Line: 80
$trap is not exists, should be $pSnmp

Line: 91
$trapPacket is not exists, should be $snmpPacket

Proposals:
All functions shoul be part od class.
SNMPTrap is better name for class.

Impreved hexlen:
    public static function hexlen( $s ) 
    {
        $len     = strlen( $s );
        $hexlen  = self::dec2hex( $len );
        $keyByte = ""; 

        if( $len > 127 ){
          $lenBytes = strlen( $hexlen ) / 2;
          $keyByte = self::dec2hex( 0x80 + $lenBytes );
        }

        return $keyByte . $hexlen;
    }






Original issue reported on code.google.com by miloslav...@gmail.com on 2 Oct 2009 at 5:07

@GoogleCodeExporter
Copy link
Author

NOTE
Right now due to many work I don't have much time to make changes and fix bugs.
If some-one wants to, mail me and I'll give you access to sources

Original comment by T.Kalapun on 11 Nov 2009 at 9:22

@GoogleCodeExporter
Copy link
Author

fixed first 2 bugs
do you want to have access to source?

Original comment by T.Kalapun on 11 Nov 2009 at 9:40

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant