Code

statsd plugin: Make metric names case-sensitive.
[collectd.git] / src / snmp.c
index 38a24cd3b29c18ac632af562a61ce62d6cca48d6..4f849320a3f3f6bdc2bdfb3730bf60fdc08016c5 100644 (file)
@@ -108,7 +108,7 @@ static int csnmp_read_host (user_data_t *ud);
  */
 static void csnmp_oid_init (oid_t *dst, oid const *src, size_t n)
 {
-  assert (n <= STATIC_ARRAY_LEN (dst->oid));
+  assert (n <= STATIC_ARRAY_SIZE (dst->oid));
   memcpy (dst->oid, src, sizeof (*src) * n);
   dst->oid_len = n;
 }
@@ -1378,9 +1378,8 @@ static int csnmp_read_table (host_definition_t *host, data_definition_t *data)
 
         /* Calculate the current suffix. This is later used to check that the
          * suffix is increasing. This also checks if we left the subtree */
-        int ret;
-        ret = csnmp_oid_suffix (&suffix, &vb_name, data->values + i);
-        if (ret != 0)
+        status = csnmp_oid_suffix (&suffix, &vb_name, data->values + i);
+        if (status != 0)
         {
           DEBUG ("snmp plugin: host = %s; data = %s; i = %i; "
               "Value probably left its subtree.",
@@ -1590,7 +1589,7 @@ static int csnmp_read_host (user_data_t *ud)
   host = ud->data;
 
   if (host->interval == 0)
-    host->interval = interval_g;
+    host->interval = plugin_get_interval ();
 
   time_start = cdtime ();