projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perl plugin: Do not pass NULL to newRV().
[collectd.git]
/
src
/
exec.c
diff --git
a/src/exec.c
b/src/exec.c
index
711ec99
..
973cd52
100644
(file)
--- a/
src/exec.c
+++ b/
src/exec.c
@@
-78,7
+78,7
@@
static pthread_mutex_t pl_lock = PTHREAD_MUTEX_INITIALIZER;
/*
* Functions
*/
/*
* Functions
*/
-static void sigchld_handler (int signal) /* {{{ */
+static void sigchld_handler (int
__attribute__((unused))
signal) /* {{{ */
{
pid_t pid;
int status;
{
pid_t pid;
int status;
@@
-690,16
+690,16
@@
static void *exec_notification_one (void *arg) /* {{{ */
for (meta = n->meta; meta != NULL; meta = meta->next)
{
if (meta->type == NM_TYPE_STRING)
for (meta = n->meta; meta != NULL; meta = meta->next)
{
if (meta->type == NM_TYPE_STRING)
- fprintf (fh, "%s: %s\n", meta->name, meta->
value
_string);
+ fprintf (fh, "%s: %s\n", meta->name, meta->
nm_value.nm
_string);
else if (meta->type == NM_TYPE_SIGNED_INT)
else if (meta->type == NM_TYPE_SIGNED_INT)
- fprintf (fh, "%s: %"PRIi64"\n", meta->name, meta->
value
_signed_int);
+ fprintf (fh, "%s: %"PRIi64"\n", meta->name, meta->
nm_value.nm
_signed_int);
else if (meta->type == NM_TYPE_UNSIGNED_INT)
else if (meta->type == NM_TYPE_UNSIGNED_INT)
- fprintf (fh, "%s: %"PRIu64"\n", meta->name, meta->
value
_unsigned_int);
+ fprintf (fh, "%s: %"PRIu64"\n", meta->name, meta->
nm_value.nm
_unsigned_int);
else if (meta->type == NM_TYPE_DOUBLE)
else if (meta->type == NM_TYPE_DOUBLE)
- fprintf (fh, "%s: %e\n", meta->name, meta->
value
_double);
+ fprintf (fh, "%s: %e\n", meta->name, meta->
nm_value.nm
_double);
else if (meta->type == NM_TYPE_BOOLEAN)
fprintf (fh, "%s: %s\n", meta->name,
else if (meta->type == NM_TYPE_BOOLEAN)
fprintf (fh, "%s: %s\n", meta->name,
- meta->
value
_boolean ? "true" : "false");
+ meta->
nm_value.nm
_boolean ? "true" : "false");
}
fprintf (fh, "\n%s\n", n->message);
}
fprintf (fh, "\n%s\n", n->message);
@@
-712,7
+712,8
@@
static void *exec_notification_one (void *arg) /* {{{ */
DEBUG ("exec plugin: Child %i exited with status %i.",
pid, status);
DEBUG ("exec plugin: Child %i exited with status %i.",
pid, status);
- plugin_notification_meta_free (n);
+ plugin_notification_meta_free (n->meta);
+ n->meta = NULL;
sfree (arg);
pthread_exit ((void *) 0);
return (NULL);
sfree (arg);
pthread_exit ((void *) 0);
return (NULL);