projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
apache plugin: Fix a segmentation fault in the config handling of VerifyPeer / Verify...
[collectd.git]
/
src
/
email.c
diff --git
a/src/email.c
b/src/email.c
index
cc68d3f
..
8fc5509
100644
(file)
--- a/
src/email.c
+++ b/
src/email.c
@@
-360,8
+360,8
@@
static void *collect (void *arg)
}
} /* while (loop) */
}
} /* while (loop) */
- log_debug ("
[thread #%5lu] s
hutting down connection on fd #%i",
-
pthread_self (),
fileno (this->socket));
+ log_debug ("
S
hutting down connection on fd #%i",
+ fileno (this->socket));
fclose (connection->socket);
free (connection);
fclose (connection->socket);
free (connection);
@@
-378,7
+378,7
@@
static void *collect (void *arg)
pthread_exit ((void *)0);
} /* static void *collect (void *) */
pthread_exit ((void *)0);
} /* static void *collect (void *) */
-static void *open_connection (void *arg)
+static void *open_connection (void
__attribute__((unused))
*arg)
{
struct sockaddr_un addr;
{
struct sockaddr_un addr;
@@
-396,9
+396,7
@@
static void *open_connection (void *arg)
}
addr.sun_family = AF_UNIX;
}
addr.sun_family = AF_UNIX;
-
- strncpy (addr.sun_path, path, (size_t)(UNIX_PATH_MAX - 1));
- addr.sun_path[UNIX_PATH_MAX - 1] = '\0';
+ sstrncpy (addr.sun_path, path, (size_t)(UNIX_PATH_MAX - 1));
errno = 0;
if (-1 == bind (connector_socket, (struct sockaddr *)&addr,
errno = 0;
if (-1 == bind (connector_socket, (struct sockaddr *)&addr,
@@
-658,12
+656,12
@@
static void email_submit (const char *type, const char *type_instance, gauge_t v
vl.values = values;
vl.values_len = 1;
vl.values = values;
vl.values_len = 1;
- vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "email", sizeof (vl.plugin));
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "email", sizeof (vl.plugin));
- strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+ sstrncpy (vl.type, type, sizeof (vl.type));
+ sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
- plugin_dispatch_values (
type,
&vl);
+ plugin_dispatch_values (&vl);
} /* void email_submit */
/* Copy list l1 to list l2. l2 may partly exist already, but it is assumed
} /* void email_submit */
/* Copy list l1 to list l2. l2 may partly exist already, but it is assumed