-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic with SYNOLOGY-DISK-MIB::diskTable #32
Comments
This is the output I get when I run the attached go program with the standard IETF MIBs and the provided Synology MIBs loaded:
|
One potential flaw that I see in the provided code is that you have a qualified name in your lookup, but you are completely ignoring the module, which might be causing an issue. You are also not returning after an errored ...
s := strings.Split(oid, "::")
moduleName := s[0]
module, err := gosmi.GetModule(moduleName)
if err != nil {
fmt.Printf("%v", err)
return
}
node := s[1]
out, err := module.GetNode(node)
if err != nil {
fmt.Printf("%v", err)
return
}
... As you already have the node in |
Thank you for your help. I will implement your suggestion :) |
I have written go code to try and load in and use
SYNOLOGY-DISK-MIB::diskTable
but it panics. I have attached the go program and the zip of the mibs. Any help is greatly appreciated.From what I can tell I call
gosmi.GetNode
,GetNode
callssmi.GetNode(smiModule, name)
, inGetNode
smiModulePtr
is empty and skips down the the for loop doesn't find anything, returnsnil
and panics.synology.txt -> the go program (github made me upload it as a txt)
Synology_MIB_File.zip -> the mibs
The text was updated successfully, but these errors were encountered: