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++)
{