X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsnmp.c;h=693cd8942ffc10919e6e7d9d9b1084096818a3e7;hb=854f18303f070d34a5373e970b7a81dd505bddfb;hp=fee2f6d50a3b6054e23781811429ac5a6cb4bd0b;hpb=07be522384e753b7921213a0dc96a50336c79a66;p=collectd.git diff --git a/src/snmp.c b/src/snmp.c index fee2f6d5..693cd894 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -754,7 +754,21 @@ static value_t csnmp_value_list_to_value (struct variable_list *vl, int type, } 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; }