summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2c1b8c)
raw | patch | inline | side by side (parent: e2c1b8c)
author | Florian Forster <octo@huhu.verplant.org> | |
Thu, 3 May 2007 09:09:02 +0000 (11:09 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 3 May 2007 09:09:02 +0000 (11:09 +0200) |
src/types_list.c | patch | blob | history |
diff --git a/src/types_list.c b/src/types_list.c
index 847d0988dd608773416b7e37845867b9219a84d6..1bbf142b9dbe85ccf19fff5c4fae34d0f1134de5 100644 (file)
--- a/src/types_list.c
+++ b/src/types_list.c
int fields_num;
if (buf_len < 11)
+ {
+ ERROR ("parse_ds: (buf_len = %u) < 11", buf_len);
return (-1);
+ }
if (buf[buf_len - 1] == ',')
{
}
if (fields_num != 4)
+ {
+ ERROR ("parse_ds: (fields_num = %i) != 4", fields_num);
return (-1);
+ }
strncpy (dsrc->name, fields[0], sizeof (dsrc->name));
dsrc->name[sizeof (dsrc->name) - 1] = '\0';
else if (strcasecmp (fields[1], "COUNTER") == 0)
dsrc->type = DS_TYPE_COUNTER;
else
+ {
+ ERROR ("(fields[1] = %s) != (GAUGE || COUNTER)", fields[1]);
return (-1);
+ }
if (strcasecmp (fields[2], "U") == 0)
dsrc->min = NAN;
if (parse_ds (ds.ds + i, fields[i + 1], strlen (fields[i + 1])) != 0)
{
sfree (ds.ds);
+ ERROR ("types_list: parse_line: Cannot parse data source #%i "
+ "of data set %s", i, ds.type);
return;
}
file = global_option_get ("TypesDB");
if (file == NULL)
+ {
+ ERROR ("global_option_get (\"TypesDB\") returned NULL.");
return (-1);
+ }
fh = fopen (file, "r");
if (fh == NULL)