Skip to content

SetRandom() in Integer32 was setting very high high value and its getting rejected by some SNMP Devices #5

Description

@mspratap6

During my uses of this library i found that some devices was not returning same request id in response, this was due to SetRandom() was setting very high value thus requestid to server was getting set as 0.

to fix this i have changed

                public void SetRandom()
                {
                        Random rand = new Random();
-                       _value = rand.Next();
+                       _value = rand.Next(0, 9999);
                }

will further analyse this issue then will create a pull request for the same.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions