Code

Merge branch 'collectd-4.1'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 5 Oct 2007 14:09:11 +0000 (16:09 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 5 Oct 2007 14:09:11 +0000 (16:09 +0200)
1  2 
configure.in
src/collectd-snmp.pod
src/collectd.conf.pod
src/snmp.c

diff --cc configure.in
Simple merge
Simple merge
Simple merge
diff --cc src/snmp.c
index a10509dae1f22097fc0bef24138e21ce423490f7,4bcdcf7d486f7a35554b3a64249938f72c0d5ab0..8673df199e9ffe135993986a24f5cc1e1607b50e
@@@ -928,31 -725,15 +925,31 @@@ static int csnmp_dispatch_table (host_d
    vl.host[sizeof (vl.host) - 1] = '\0';
    strcpy (vl.plugin, "snmp");
  
-   vl.interval = host->skip_num;
+   vl.interval = host->interval;
    vl.time = time (NULL);
  
 -  for (instance_list_ptr = instance_list;
 -      instance_list_ptr != NULL;
 -      instance_list_ptr = instance_list_ptr->next)
 +  subid = 0;
 +  have_more = 1;
 +
 +  while (have_more != 0)
    {
 -    strncpy (vl.type_instance, instance_list_ptr->instance, sizeof (vl.type_instance));
 -    vl.type_instance[sizeof (vl.type_instance) - 1] = '\0';
 +    if (instance_list != NULL)
 +    {
 +      while ((instance_list_ptr != NULL)
 +        && (instance_list_ptr->subid < subid))
 +      instance_list_ptr = instance_list_ptr->next;
 +
 +      if (instance_list_ptr == NULL)
 +      {
 +      have_more = 0;
 +      continue;
 +      }
 +      else if (instance_list_ptr->subid > subid)
 +      {
 +      subid = instance_list_ptr->subid;
 +      continue;
 +      }
 +    } /* if (instance_list != NULL) */
  
      for (i = 0; i < data->values_len; i++)
      {