static void type_list_incr (type_list_t *list, char *name, int incr)
{
if (NULL == list->head) {
static void type_list_incr (type_list_t *list, char *name, int incr)
{
if (NULL == list->head) {
- char *path = (NULL == sock_file) ? SOCK_PATH : sock_file;
- char *group = (NULL == sock_group) ? COLLECTD_GRP_NAME : sock_group;
+ const char *path = (NULL == sock_file) ? SOCK_PATH : sock_file;
+ const char *group = (NULL == sock_group) ? COLLECTD_GRP_NAME : sock_group;
- if (0 != (err = plugin_thread_create (&collectors[i]->thread,
- &ptattr, collect, collectors[i]))) {
+ if (plugin_thread_create (&collectors[i]->thread,
+ &ptattr, collect, collectors[i],
+ "email collector") != 0) {
sstrerror (errno, errbuf, sizeof (errbuf)));
collectors[i]->thread = (pthread_t) 0;
}
sstrerror (errno, errbuf, sizeof (errbuf)));
collectors[i]->thread = (pthread_t) 0;
}
- int err = 0;
-
- if (0 != (err = plugin_thread_create (&connector, NULL,
- open_connection, NULL))) {
+ if (plugin_thread_create (&connector, NULL,
+ open_connection, NULL, "email listener") != 0) {
if (connector != ((pthread_t) 0)) {
pthread_kill (connector, SIGTERM);
connector = (pthread_t) 0;
if (connector != ((pthread_t) 0)) {
pthread_kill (connector, SIGTERM);
connector = (pthread_t) 0;
sstrncpy (vl.plugin, "email", sizeof (vl.plugin));
sstrncpy (vl.type, type, sizeof (vl.type));
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
sstrncpy (vl.plugin, "email", sizeof (vl.plugin));
sstrncpy (vl.type, type, sizeof (vl.type));
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
* after they have been copied to l2. */
static void copy_type_list (type_list_t *l1, type_list_t *l2)
{
* after they have been copied to l2. */
static void copy_type_list (type_list_t *l1, type_list_t *l2)
{