summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e1bb73)
raw | patch | inline | side by side (parent: 0e1bb73)
author | Florian Forster <octo@noris.net> | |
Wed, 19 May 2010 10:14:46 +0000 (12:14 +0200) | ||
committer | Florian Forster <octo@noris.net> | |
Wed, 19 May 2010 10:14:46 +0000 (12:14 +0200) |
src/snmp.c | patch | blob | history |
diff --git a/src/snmp.c b/src/snmp.c
index 96a0971ca4a571f6dc894b5d05f864278da8752f..693cd8942ffc10919e6e7d9d9b1084096818a3e7 100644 (file)
--- a/src/snmp.c
+++ b/src/snmp.c
{
/* We'll handle this later.. */
}
-#ifdef ASN_NULL
- else if (vl->type == ASN_NULL)
- {
- /* Don't print a warning. */
- defined = 0;
- }
-#endif
else
{
- WARNING ("snmp plugin: I don't know the ASN type `%i'", (int) vl->type);
+ char oid_buffer[1024];
+
+ memset (oid_buffer, 0, sizeof (oid_buffer));
+ snprint_objid (oid_buffer, sizeof (oid_buffer) - 1,
+ vl->name, vl->name_length);
+
+#ifdef ASN_NULL
+ if (vl->type == ASN_NULL)
+ INFO ("snmp plugin: OID \"%s\" is undefined (type ASN_NULL)",
+ oid_buffer);
+ else
+#endif
+ WARNING ("snmp plugin: I don't know the ASN type \"%i\" (OID: %s)",
+ (int) vl->type, oid_buffer);
+
defined = 0;
}