diff options
author | Stef Walter <stef@memberwebs.com> | 2006-11-28 01:53:57 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-11-28 01:53:57 +0000 |
commit | fafb8142821a34311f55971674630b674b063495 (patch) | |
tree | 58aef24fc7ce8fc093d5e477dbacf8306b412859 /daemon | |
parent | 9791f61c323d2769abfe0e9889b81c52ca1309af (diff) |
Added SNMP v2 support.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/config.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/daemon/config.c b/daemon/config.c index 34cecfb..49f8e0f 100644 --- a/daemon/config.c +++ b/daemon/config.c @@ -229,14 +229,9 @@ parse_item(const char* field, char* uri, config_ctx *ctx) ASSERT(host && path); /* Currently we only support SNMP pollers */ - if(strcmp(scheme, CONFIG_SNMP) == 0) - version = SNMP_V1; - else if(strcmp(scheme, CONFIG_SNMP2) == 0) - version = SNMP_V2c; - else if(strcmp(scheme, CONFIG_SNMP2C) == 0) - version = SNMP_V2c; - else - errx(2, "%s: invalid poll scheme: %s", ctx->confname, scheme); + msg = cfg_parse_scheme(scheme, &version); + if(msg) + errx(2, "%s: %s", msg, scheme); /* * Build a lookup key. We can only combine requests for the same |