projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
interface plugin: Fix for bogus interfaces under Solaris.
[collectd.git]
/
src
/
configfile.c
diff --git
a/src/configfile.c
b/src/configfile.c
index
fe2bce3
..
0b7786f
100644
(file)
--- a/
src/configfile.c
+++ b/
src/configfile.c
@@
-99,6
+99,7
@@
static cf_global_option_t cf_global_options[] =
{"FQDNLookup", NULL, "false"},
{"Interval", NULL, "10"},
{"ReadThreads", NULL, "5"},
{"FQDNLookup", NULL, "false"},
{"Interval", NULL, "10"},
{"ReadThreads", NULL, "5"},
+ {"Timeout", NULL, "2"},
{"PreCacheChain", NULL, "PreCache"},
{"PostCacheChain", NULL, "PostCache"}
};
{"PreCacheChain", NULL, "PreCache"},
{"PostCacheChain", NULL, "PostCache"}
};
@@
-700,11
+701,10
@@
static oconfig_item_t *cf_read_generic (const char *path, int depth)
if (status != 0)
{
char errbuf[1024];
if (status != 0)
{
char errbuf[1024];
-
ERROR
("configfile: stat (%s) failed: %s",
+
WARNING
("configfile: stat (%s) failed: %s",
path_ptr,
sstrerror (errno, errbuf, sizeof (errbuf)));
path_ptr,
sstrerror (errno, errbuf, sizeof (errbuf)));
- oconfig_free (root);
- return (NULL);
+ continue;
}
if (S_ISREG (statbuf.st_mode))
}
if (S_ISREG (statbuf.st_mode))
@@
-713,7
+713,7
@@
static oconfig_item_t *cf_read_generic (const char *path, int depth)
temp = cf_read_dir (path_ptr, depth);
else
{
temp = cf_read_dir (path_ptr, depth);
else
{
-
ERROR
("configfile: %s is neither a file nor a "
+
WARNING
("configfile: %s is neither a file nor a "
"directory.", path);
continue;
}
"directory.", path);
continue;
}
@@
-730,6
+730,12
@@
static oconfig_item_t *cf_read_generic (const char *path, int depth)
wordfree (&we);
wordfree (&we);
+ if (root->children == NULL)
+ {
+ oconfig_free (root);
+ return (NULL);
+ }
+
return (root);
} /* oconfig_item_t *cf_read_generic */
/* #endif HAVE_WORDEXP_H */
return (root);
} /* oconfig_item_t *cf_read_generic */
/* #endif HAVE_WORDEXP_H */