From 1e735c038c86294df2ecfbd6a39abcfab4b3e8c3 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 4 Apr 2006 21:07:18 +0000 Subject: Move functionality for parsing MIBs, SNMP into common files. --- daemon/rrdbotd.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'daemon/rrdbotd.c') diff --git a/daemon/rrdbotd.c b/daemon/rrdbotd.c index 261955d..e2b0248 100644 --- a/daemon/rrdbotd.c +++ b/daemon/rrdbotd.c @@ -46,6 +46,7 @@ #include #include +#include #include "rrdbotd.h" #include "server-mainloop.h" @@ -53,7 +54,6 @@ /* The default command line options */ #define DEFAULT_CONFIG CONF_PREFIX "/rrdbot" #define DEFAULT_WORK "/var/db/rrdbot" -#define DEFAULT_MIB DATA_PREFIX "/mib" #define DEFAULT_RETRIES 3 #define DEFAULT_TIMEOUT 5 @@ -64,10 +64,6 @@ /* The one main state object */ rb_state g_state; -/* Whether we print warnings when loading MIBs or not */ -const char* g_mib_directory = DEFAULT_MIB; -int g_mib_warnings = 0; - /* Some logging flags */ static int daemonized = 0; static int debug_level = LOG_ERR; @@ -251,12 +247,12 @@ main(int argc, char* argv[]) /* mib directory */ case 'm': - g_mib_directory = optarg; + mib_directory = optarg; break; /* MIB load warnings */ case 'M': - g_mib_warnings = 1; + mib_warnings = 1; break; /* Write out a pid file */ @@ -309,7 +305,7 @@ main(int argc, char* argv[]) rb_config_parse(); /* As an optimization we unload the MIB processing data here */ - rb_mib_uninit(); + mib_uninit(); /* Rev up the main engine */ rb_snmp_engine_init(); -- cgit v1.2.3