- DBG ("time = %u; host = %s; "
- "plugin = %s; plugin_instance = %s; "
- "type = %s; type_instance = %s;",
- (unsigned int) vl->time, vl->host,
- vl->plugin, vl->plugin_instance,
- ds->type, vl->type_instance);
-
- buf_len = sizeof (buf);
- buf_ptr = buf;
- if (write_part_string (&buf_ptr, &buf_len, TYPE_HOST,
- vl->host, strlen (vl->host)) != 0)
- return (-1);
- if (write_part_number (&buf_ptr, &buf_len, TYPE_TIME,
- (uint64_t) vl->time))
- return (-1);
- if (write_part_string (&buf_ptr, &buf_len, TYPE_PLUGIN,
- vl->plugin, strlen (vl->plugin)) != 0)
- return (-1);
- if (strlen (vl->plugin_instance) > 0)
- if (write_part_string (&buf_ptr, &buf_len, TYPE_PLUGIN_INSTANCE,
+ if (strcmp (vl_def->plugin, vl->plugin) != 0)
+ {
+ if (write_part_string (&buffer, &buffer_size, TYPE_PLUGIN,
+ vl->plugin, strlen (vl->plugin)) != 0)
+ return (-1);
+ strcpy (vl_def->plugin, vl->plugin);
+ DBG ("plugin = %s", vl->plugin);
+ }
+
+ if (strcmp (vl_def->plugin_instance, vl->plugin_instance) != 0)
+ {
+ if (write_part_string (&buffer, &buffer_size, TYPE_PLUGIN_INSTANCE,