projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/plugin.c: Report an error if ctx.interval is not set.
[collectd.git]
/
src
/
common.c
diff --git
a/src/common.c
b/src/common.c
index
6fdb441
..
0069a8b
100644
(file)
--- a/
src/common.c
+++ b/
src/common.c
@@
-543,7
+543,8
@@
int check_create_dir (const char *file_orig)
}
while (42) {
}
while (42) {
- if (stat (dir, &statbuf) == -1)
+ if ((stat (dir, &statbuf) == -1)
+ && (lstat (dir, &statbuf) == -1))
{
if (errno == ENOENT)
{
{
if (errno == ENOENT)
{
@@
-939,15
+940,15
@@
int parse_identifier_vl (const char *str, value_list_t *vl) /* {{{ */
if (status != 0)
return (status);
if (status != 0)
return (status);
- sstrncpy (vl->host, host, sizeof (host));
- sstrncpy (vl->plugin, plugin, sizeof (plugin));
+ sstrncpy (vl->host, host, sizeof (
vl->
host));
+ sstrncpy (vl->plugin, plugin, sizeof (
vl->
plugin));
sstrncpy (vl->plugin_instance,
(plugin_instance != NULL) ? plugin_instance : "",
sstrncpy (vl->plugin_instance,
(plugin_instance != NULL) ? plugin_instance : "",
- sizeof (plugin_instance));
- sstrncpy (vl->type, type, sizeof (type));
+ sizeof (
vl->
plugin_instance));
+ sstrncpy (vl->type, type, sizeof (
vl->
type));
sstrncpy (vl->type_instance,
(type_instance != NULL) ? type_instance : "",
sstrncpy (vl->type_instance,
(type_instance != NULL) ? type_instance : "",
- sizeof (type_instance));
+ sizeof (
vl->
type_instance));
return (0);
} /* }}} int parse_identifier_vl */
return (0);
} /* }}} int parse_identifier_vl */
@@
-980,12
+981,15
@@
int parse_value (const char *value, value_t *ret_value, int ds_type)
}
if (value == endptr) {
}
if (value == endptr) {
- ERROR ("parse_value: Failed to parse string as number: %s.", value);
+ ERROR ("parse_value: Failed to parse string as %s: %s.",
+ DS_TYPE_TO_STRING (ds_type), value);
return -1;
}
else if ((NULL != endptr) && ('\0' != *endptr))
return -1;
}
else if ((NULL != endptr) && ('\0' != *endptr))
- WARNING ("parse_value: Ignoring trailing garbage after number: %s.",
- endptr);
+ INFO ("parse_value: Ignoring trailing garbage \"%s\" after %s value. "
+ "Input string was \"%s\".",
+ endptr, DS_TYPE_TO_STRING (ds_type), value);
+
return 0;
} /* int parse_value */
return 0;
} /* int parse_value */