- i = 0;
- dummy = value_str;
- saveptr = NULL;
- while ((ptr = strtok_r (dummy, ":", &saveptr)) != NULL)
- {
- dummy = NULL;
-
- if (i >= vl->values_len)
- {
- i = vl->values_len + 1;
- break;
- }
-
- if ((strcmp (ptr, "U") == 0) && (ds->ds[i].type == DS_TYPE_GAUGE))
- vl->values[i].gauge = NAN;
- else if (0 != parse_value (ptr, &vl->values[i], ds->ds[i]))
- {
- print_to_socket (fh, "-1 Failed to parse value `%s'.", ptr);
- return (-1);
- }
-
- i++;
- } /* while (strtok_r) */
-
- if (i != vl->values_len)