Hi all,
 
I just subscribed to this mailing list because I found what I think is a
bug in the libsnmp project.
 
When I set "netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_NO_DISPLAY_HINT, 1);" it will still use the display
hint... 
To solve this bug I changed the following in the mib.c file on line
3244:
 
else if (subtree) {
    const char *units = NULL;
    const char *hint = NULL;
    if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
                     NETSNMP_DS_LIB_DONT_PRINT_UNITS)) {
        units = subtree->units;
    }
 
    if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID,
                     NETSNMP_DS_LIB_NO_DISPLAY_HINT)) {
        hint = subtree->hint;
    }
 
    if (subtree->printomat) {
        return (*subtree->printomat) (buf, buf_len, out_len,
                                      allow_realloc, variable,
                                      subtree->enums, hint,
                                      units);
    } else {
        return sprint_realloc_by_type(buf, buf_len, out_len,
                                      allow_realloc, variable,
                                      subtree->enums, hint,
                                      units);
    }
}
 
I only added the "hint" parts, the "unit" parts were already present...
I don't know if this is a good fix for the problem, but it sure does the
trick :-)
 
Kind regards,
________________________________

Kristof Verpoorten
Software Engineer
eventIS
 
M: +32 (0)49 706 1041   |   T: +31 (0)40 248 8177   |   F: +31 (0)40 248
8179
Flight Forum 882   |   5657 DV  Eindhoven   |   The Netherlands
E:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
|   W: www.eventIS.nl <http://www.eventis.nl/>  
________________________________

eventIS is making TV personal
 
This e-mail and/or its attachments contain confidential information and
is for the exclusive use of the addressees. The content may also contain
legal, professional or other privileged information. If you are not the
intended recipient, please notify the sender immediately and then delete
the e-mail and any attachments. You should not disclose, copy or take
any action in reliance on this transmission. Please ensure you have
adequate virus protection before you open or detach any documents from
this transmission. eventIS does not accept liability for any loss or
damage suffered by any person or company arising from the use of this
e-mail and/or its attachments.
 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to