if (hd->interval != 0)
cb_interval.tv_sec = (time_t) hd->interval;
- status = plugin_register_complex_read (cb_name, csnmp_read_host,
- /* interval = */ &cb_interval, /* user_data = */ &cb_data);
+ status = plugin_register_complex_read (/* group = */ NULL, cb_name,
+ csnmp_read_host, /* interval = */ &cb_interval,
+ /* user_data = */ &cb_data);
if (status != 0)
{
ERROR ("snmp plugin: Registering complex read function failed.");
}
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;
}
for (i = 0; i < num_chars; i++)
{
/* Check for control characters. */
- if ((src[i] >= 0) && (src[i] < 32))
+ if ((unsigned char)src[i] < 32)
return (csnmp_strvbcopy_hexstring (dst, vb, dst_size));
dst[i] = src[i];
}
char temp[DATA_MAX_NAME_LEN];
if (instance_list_ptr == NULL)
- ssnprintf (temp, sizeof (temp), "%u", (uint32_t) subid);
+ ssnprintf (temp, sizeof (temp), "%"PRIu32, (uint32_t) subid);
else
sstrncpy (temp, instance_list_ptr->instance, sizeof (temp));