author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 5 Oct 2007 14:09:11 +0000 (16:09 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 5 Oct 2007 14:09:11 +0000 (16:09 +0200) |
1 | 2 | |||
---|---|---|---|---|
configure.in | patch | | diff1 | | diff2 | | blob | history |
src/collectd-snmp.pod | patch | | diff1 | | diff2 | | blob | history |
src/collectd.conf.pod | patch | | diff1 | | diff2 | | blob | history |
src/snmp.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc configure.in
Simple merge
diff --cc src/collectd-snmp.pod
Simple merge
diff --cc src/collectd.conf.pod
Simple merge
diff --cc src/snmp.c
index a10509dae1f22097fc0bef24138e21ce423490f7,4bcdcf7d486f7a35554b3a64249938f72c0d5ab0..8673df199e9ffe135993986a24f5cc1e1607b50e
--- 1/src/snmp.c
--- 2/src/snmp.c
+++ b/src/snmp.c
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++)
{