diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-11-13 17:55:55 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-11-13 17:55:55 +0000 |
commit | a3fb8e9a74d1a301e47b7e76b3f697974b7dbc3c (patch) | |
tree | 5d150e20ebf78c4dc09c386eb92595d549603b40 /epan/oids.c | |
parent | 8b42b795e8476f39d13382009e34d034f2c57b90 (diff) |
On OS X, prepend /usr/share/snmp/mibs to the SMI path. Partial fix for
bug 3163.
svn path=/trunk/; revision=30951
Diffstat (limited to 'epan/oids.c')
-rw-r--r-- | epan/oids.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/epan/oids.c b/epan/oids.c index e2ef23fad9..3935f41df1 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -547,20 +547,17 @@ static void register_mibs(void) { return; } + smi_errors = g_string_new(""); + smiSetErrorHandler(smi_error_handler); + path_str = oid_get_default_mib_path(); D(1,("SMI Path: '%s'",path_str)); smiSetPath(path_str); - - - smi_errors = g_string_new(""); - smiSetErrorHandler(smi_error_handler); - for(i=0;i<num_smi_modules;i++) { if (!smi_modules[i].name) continue; - if (smiIsLoaded(smi_modules[i].name)) { continue; } else { @@ -1081,6 +1078,12 @@ oid_get_default_mib_path(void) { #else #define PATH_SEPARATOR ":" path = smiGetPath(); +#ifdef __APPLE__ + g_string_append(path_str, "/usr/share/snmp/mibs"); + if (strlen(path) > 0 ) { + g_string_append(path_str, PATH_SEPARATOR); + } +#endif g_string_append_printf(path_str, "%s", path); free (path); #endif |