[prev in list] [next in list] [prev in thread] [next in thread] 

List:       collectd
Subject:    Re: [collectd] Unixsock plugin memleaks
From:       "Gerrie Roos" <groos () xiplink ! com>
Date:       2012-05-30 20:30:14
Message-ID: ABC63FEABB7C46969551502A959AFC15 () wattoo
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Dave
 
Yay, so I've found some leaks and prepared a diff!  I've also included misc.
other fixes and one cool feature.  I'm still working on 4.10.2 so the
patches might not work or still be applicable to 5.x, but last time I
checked at least some of the issues I fixed were not fixed in 5.x.  I assume
you guys will review and manually merge into 5.x and/or 4.10.x.  I'd be
happy to provide more info and answer questions if anything I've done is not
clear.
 
Quick overview:
    Fixed various collectd memory leaks.

    Fixed collectd's unixsock read interrupted by SIGCHLD's.
    Fixed collectd exec module: incorrectly exited select loop on signal.
    Fixed incorrect collectd warning when configuring network plugin.
    Collectd's scale plugin now supports scaling only on specific data
sources, yay!  (New feature)
 
Apologies if I wasn't supposed to paste the patch in the body of the email,
but here goes:
 
 
commit ba04be9feeec4f40b9ada1cae64c0a27634f1c76
Author: Gerrie Roos <groos@xiplink.com>
Date:   Fri May 25 05:38:47 2012 +0200
 
    Fixed various collectd memory leaks.
    
    Once I understood what's going on I tried to keep the changes to a
minimum.

diff --git a/src/collectd.c b/src/collectd.c
index 277d3b0..f5df460 100644
--- a/src/collectd.c
+++ b/src/collectd.c
@@ -77,6 +77,7 @@ static void sig_usr1_handler (int __attribute__((unused))
signal)
  pthread_attr_init (&attr);
  pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
  pthread_create (&thread, &attr, do_flush, NULL);
+ pthread_attr_destroy (&attr);
 }
 
 static int init_hostname (void)
diff --git a/src/exec.c b/src/exec.c
index 322ff67..265ec01 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -827,6 +827,7 @@ static int exec_read (void) /* {{{ */
     pthread_attr_init (&attr);
     pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
     pthread_create (&t, &attr, exec_read_one, (void *) pl);
+    pthread_attr_destroy(&attr);
   } /* for (pl) */
 
   return (0);
@@ -870,6 +871,7 @@ static int exec_notification (const notification_t *n,
/* {{{ */
     pthread_attr_init (&attr);
     pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
     pthread_create (&t, &attr, exec_notification_one, (void *) pln);
+    pthread_attr_destroy (&attr);
   } /* for (pl) */
 
   return (0);
diff --git a/src/meta_data.c b/src/meta_data.c
index 6a336c4..9307e5e 100644
--- a/src/meta_data.c
+++ b/src/meta_data.c
@@ -214,6 +214,7 @@ void meta_data_destroy (meta_data_t *md) /* {{{ */
   if (md == NULL)
     return;
 
+  pthread_mutex_destroy(&md->lock);
   md_entry_free (md->head);
   free (md);
 } /* }}} void meta_data_destroy */
diff --git a/src/unixsock.c b/src/unixsock.c
index 1010b59..dea8be0 100644
--- a/src/unixsock.c
+++ b/src/unixsock.c
@@ -187,6 +187,7 @@ static void *us_handle_client (void *arg)
   close (fdin);
   close (fdout);
   pthread_exit ((void *) 1);
+  return ((void *) 0);
  }
 
  fhout = fdopen (fdout, "w");
@@ -198,6 +199,7 @@ static void *us_handle_client (void *arg)
   fclose (fhin); /* this closes fdin as well */
   close (fdout);
   pthread_exit ((void *) 1);
+  return ((void *) 0);
  }
 
  /* change output buffer to line buffered mode */
@@ -209,6 +211,7 @@ static void *us_handle_client (void *arg)
   fclose (fhin);
   fclose (fhout);
   pthread_exit ((void *) 1);
+  return ((void *) 0);
  }
 
  while (42)
@@ -253,6 +256,7 @@ static void *us_handle_client (void *arg)
    fclose (fhin);
    fclose (fhout);
    pthread_exit ((void *) 1);
+   return ((void *) 0);
   }
 
   if (strcasecmp (fields[0], "getval") == 0)
@@ -307,9 +311,13 @@ static void *us_server_thread (void
__attribute__((unused)) *arg)
  pthread_t th;
  pthread_attr_t th_attr;
 
+ pthread_attr_init (&th_attr);
+ pthread_attr_setdetachstate (&th_attr, PTHREAD_CREATE_DETACHED);
+
  if (us_open_socket () != 0)
   pthread_exit ((void *) 1);
 
+
  while (loop != 0)
  {
   DEBUG ("unixsock plugin: Calling accept..");
@@ -325,6 +333,7 @@ static void *us_server_thread (void
__attribute__((unused)) *arg)
      sstrerror (errno, errbuf, sizeof (errbuf)));
    close (sock_fd);
    sock_fd = -1;
+   pthread_attr_destroy(&th_attr);
    pthread_exit ((void *) 1);
   }
 
@@ -341,9 +350,6 @@ static void *us_server_thread (void
__attribute__((unused)) *arg)
 
   DEBUG ("Spawning child to handle connection on fd #%i", *remote_fd);
 
-  pthread_attr_init (&th_attr);
-  pthread_attr_setdetachstate (&th_attr, PTHREAD_CREATE_DETACHED);
-
   status = pthread_create (&th, &th_attr, us_handle_client, (void *)
remote_fd);
   if (status != 0)
   {
@@ -358,6 +364,7 @@ static void *us_server_thread (void
__attribute__((unused)) *arg)
 
  close (sock_fd);
  sock_fd = -1;
+ pthread_attr_destroy(&th_attr);
 
  status = unlink ((sock_file != NULL) ? sock_file : US_DEFAULT_PATH);
  if (status != 0)
diff --git a/src/utils_cmd_listval.c b/src/utils_cmd_listval.c
index 4ca9646..f923fca 100644
--- a/src/utils_cmd_listval.c
+++ b/src/utils_cmd_listval.c
@@ -89,8 +89,9 @@ int handle_listval (FILE *fh, char *buffer)
 
   print_to_socket (fh, "%i Value%s found\n",
       (int) number, (number == 1) ? "" : "s");
-  for (i = 0; i < number; i++)
+  for (i = 0; i < number; i++) {
     print_to_socket (fh, "%u %s\n", (unsigned int) times[i], names[i]);
+  }
 
   free_everything_and_return (0);
 } /* int handle_listval */
diff --git a/src/utils_fbhash.c b/src/utils_fbhash.c
index d20b7e3..9f1058b 100644
--- a/src/utils_fbhash.c
+++ b/src/utils_fbhash.c
@@ -234,6 +234,7 @@ void fbh_destroy (fbhash_t *h) /* {{{ */
   if (h == NULL)
     return;
 
+  pthread_mutex_destroy(&h->lock);
   free (h->filename);
   fbh_free_tree (h->tree);
 } /* }}} void fbh_destroy */
 
commit 402e0a1746a67e47619ffc4ce2ad6317e8884cfe
Author: Gerrie Roos <groos@xiplink.com>
Date:   Tue Apr 17 15:22:36 2012 +0200
 
    Fixed collectd's unixsock read interrupted by SIGCHLD's.
 
diff --git a/src/unixsock.c b/src/unixsock.c
index 0b89748..1010b59 100644
--- a/src/unixsock.c
+++ b/src/unixsock.c
@@ -222,6 +222,9 @@ static void *us_handle_client (void *arg)
   errno = 0;
   if (fgets (buffer, sizeof (buffer), fhin) == NULL)
   {
+   if (errno == EINTR)
+    continue;
+
    if (errno != 0)
    {
     char errbuf[1024];
 
commit 9f4c960f94bc70d680400b50a84655f288e7e96d
Author: Gerrie Roos <groos@xiplink.com>
Date:   Tue Jan 10 09:00:42 2012 +0200
 
    Fixed collectd exec module: incorrectly exited select loop on signal.
 
diff --git a/src/exec.c b/src/exec.c
index c64f949..322ff67 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -584,8 +584,15 @@ static void *exec_read_one (void *arg) /* {{{ */
   /* We use a copy of fdset, as select modifies it */
   copy = fdset;
 
-  while (select(highest_fd + 1, &copy, NULL, NULL, NULL ) > 0)
+  while (1)
   {
+    int e = select(highest_fd + 1, &copy, NULL, NULL, NULL );
+    if (e < 0) {
+      if (errno == EINTR)
+ continue;
+      break;
+    }
+
     int len;
 
     if (FD_ISSET(fd, &copy))
 
commit 27dd489e1242af63d2df04dfe627c440512e8da1
Author: Gerrie Roos <groos@xiplink.com>
Date:   Tue Dec 20 06:30:59 2011 +0200
 
    Fixed incorrect collectd warning when configuring network plugin.
 
diff --git a/src/network.c b/src/network.c
index 412b457..aa1c858 100644
--- a/src/network.c
+++ b/src/network.c
@@ -1685,9 +1685,9 @@ static int network_set_interface (const sockent_t *se,
const struct addrinfo *ai
  }
 
  /* else: Not a multicast interface. */
-#if defined(HAVE_IF_INDEXTONAME) && HAVE_IF_INDEXTONAME &&
defined(SO_BINDTODEVICE)
  if (se->interface != 0)
  {
+#if defined(HAVE_IF_INDEXTONAME) && HAVE_IF_INDEXTONAME &&
defined(SO_BINDTODEVICE)
   char interface_name[IFNAMSIZ];
 
   if (if_indextoname (se->interface, interface_name) == NULL)
@@ -1704,11 +1704,10 @@ static int network_set_interface (const sockent_t
*se, const struct addrinfo *ai
      sstrerror (errno, errbuf, sizeof (errbuf)));
    return (-1);
   }
- }
 /* #endif HAVE_IF_INDEXTONAME && SO_BINDTODEVICE */
 
 #else
- WARNING ("network plugin: Cannot set the interface on a unicast "
+  WARNING ("network plugin: Cannot set the interface on a unicast "
    "socket because "
 # if !defined(SO_BINDTODEVICE)
    "the the \"SO_BINDTODEVICE\" socket option "
@@ -1718,6 +1717,8 @@ static int network_set_interface (const sockent_t *se,
const struct addrinfo *ai
    "is not available on your system.");
 #endif
 
+ }
+
  return (0);
 } /* }}} network_set_interface */
 
commit 641dc2dd4c595ede24c3997e4aa9db5c4528a2cd
Author: Gerrie Roos <groos@xiplink.com>
Date:   Wed May 25 18:28:55 2011 +0200
 
    Collectd's scale plugin now supports scaling only on specific data
sources, yay!
 
diff --git a/src/target_scale.c b/src/target_scale.c
index 29fecdf..a8d7038 100644
--- a/src/target_scale.c
+++ b/src/target_scale.c
@@ -29,6 +29,9 @@ struct ts_data_s
 {
  double factor;
  double offset;
+
+ char **data_sources;
+ size_t data_sources_num;
 };
 typedef struct ts_data_s ts_data_t;
 
@@ -300,6 +303,67 @@ static int ts_config_set_double (double *ret,
oconfig_item_t *ci) /* {{{ */
  return (0);
 } /* }}} int ts_config_set_double */
 
+static int ts_config_add_data_source(ts_data_t *data, /* {{{ */
+  oconfig_item_t *ci)
+{
+ size_t new_data_sources_num;
+ char **temp;
+ int i;
+
+ /* Check number of arbuments. */
+ if (ci->values_num < 1)
+ {
+  ERROR ("`value' match: `%s' needs at least one argument.",
+    ci->key);
+  return (-1);
+ }
+
+ /* Check type of arguments */
+ for (i = 0; i < ci->values_num; i++)
+ {
+  if (ci->values[i].type == OCONFIG_TYPE_STRING)
+   continue;
+
+  ERROR ("`value' match: `%s' accepts only string arguments "
+    "(argument %i is a %s).",
+    ci->key, i + 1,
+    (ci->values[i].type == OCONFIG_TYPE_BOOLEAN)
+    ? "truth value" : "number");
+  return (-1);
+ }
+
+ /* Allocate space for the char pointers */
+ new_data_sources_num = data->data_sources_num + ((size_t) ci->values_num);
+ temp = (char **) realloc (data->data_sources,
+   new_data_sources_num * sizeof (char *));
+ if (temp == NULL)
+ {
+  ERROR ("`value' match: realloc failed.");
+  return (-1);
+ }
+ data->data_sources = temp;
+
+ /* Copy the strings, allocating memory as needed.  */
+ for (i = 0; i < ci->values_num; i++)
+ {
+  size_t j;
+
+  /* If we get here, there better be memory for us to write to.  */
+  assert (data->data_sources_num < new_data_sources_num);
+
+  j = data->data_sources_num;
+  data->data_sources[j] = sstrdup (ci->values[i].value.string);
+  if (data->data_sources[j] == NULL)
+  {
+   ERROR ("`value' match: sstrdup failed.");
+   continue;
+  }
+  data->data_sources_num++;
+ }
+
+ return (0);
+} /* }}} int ts_config_add_data_source */
+
 static int ts_destroy (void **user_data) /* {{{ */
 {
  ts_data_t **data;
@@ -309,6 +373,13 @@ static int ts_destroy (void **user_data) /* {{{ */
 
  data = (ts_data_t **) user_data;
 
+ if (*data && (*data)->data_sources) {
+  size_t i;
+  for (i = 0; i < (*data)->data_sources_num; i++)
+   free((*data)->data_sources[i]);
+  free((*data)->data_sources);
+ }
+
  free (*data);
  *data = NULL;
 
@@ -341,6 +412,8 @@ static int ts_create (const oconfig_item_t *ci, void
**user_data) /* {{{ */
     status = ts_config_set_double (&data->factor, child);
   else if (strcasecmp ("Offset", child->key) == 0)
     status = ts_config_set_double (&data->offset, child);
+  else if (strcasecmp ("DataSource", child->key) == 0)
+    status = ts_config_add_data_source(data, child);
   else
   {
    ERROR ("Target `scale': The `%s' configuration option is not understood
"
@@ -393,6 +466,18 @@ static int ts_invoke (const data_set_t *ds,
value_list_t *vl, /* {{{ */
 
  for (i = 0; i < ds->ds_num; i++)
  {
+  /* If we've got a list of data sources, is it in the list? */
+  if (data->data_sources) {
+   size_t j;
+   for (j = 0; j < data->data_sources_num; j++)
+    if (strcasecmp(ds->ds[i].name, data->data_sources[j]) == 0)
+     break;
+
+   /* No match, ignore */
+   if (j >= data->data_sources_num)
+    continue;
+  }
+
   if (ds->ds[i].type == DS_TYPE_COUNTER)
    ts_invoke_counter (ds, vl, data, i);
   else if (ds->ds[i].type == DS_TYPE_GAUGE)
 
 
 
 
Hope you find this useful,
gerrie
 

  _____  

From: David Halko [mailto:davidhalko@gmail.com] 
Sent: 25 May 2012 09:23 PM
To: groos@xiplink.com
Cc: collectd@verplant.org
Subject: Re: [collectd] Unixsock plugin memleaks


It sounds like a good deal, if you share the changed, 
if you have fixed some memory leaks!!!

Dave
http://netmgt.blogspot.com/


On Thu, May 24, 2012 at 11:21 AM, Gerrie Roos <groos@xiplink.com> wrote:


Hi ppl

I've been chasing some memory leaks in the unixsock plugin (already found a
couple) but there might still be some leaks.  Has anybody been working on
this plugin recently?  I'd be happy to share what I've got so far.

gerrie
_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


  _____  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2176 / Virus Database: 2425/5022 - Release Date: 05/25/12


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6002.18591" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>Hi Dave</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>Yay, so I've found some leaks and prepared a diff!&nbsp; 
I've also included misc. other fixes and one cool feature.&nbsp; I'm still 
working on 4.10.2 so the patches might not work or still be applicable to 5.x, 
but last time I checked at least some of the issues I fixed were not fixed in 
5.x.&nbsp; I assume you guys&nbsp;will review and manually merge into 5.x and/or 
4.10.x.&nbsp; I'd be happy to provide more info and answer questions if anything 
I've done is not clear.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>Quick overview:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp; Fixed various collectd memory leaks.<BR>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp; Fixed collectd's unixsock read 
interrupted by SIGCHLD's.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;Fixed collectd exec module: 
incorrectly exited select loop on 
signal.</FONT></SPAN></DIV></SPAN></DIV></FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;Fixed incorrect collectd warning 
when configuring network plugin.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp; Collectd's scale plugin now supports 
scaling only on specific data sources, yay!&nbsp; (New 
feature)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012>Apologies if I wasn't 
supposed to paste the patch in the body of the email, but here 
goes:</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN 
class=609501520-30052012></SPAN>&nbsp;</DIV></SPAN></DIV></DIV></FONT></SPAN></FONT></SPAN>
 <DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>commit ba04be9feeec4f40b9ada1cae64c0a27634f1c76<BR>Author: 
Gerrie Roos &lt;<A 
href="mailto:groos@xiplink.com">groos@xiplink.com</A>&gt;<BR>Date:&nbsp;&nbsp; 
Fri May 25 05:38:47 2012 +0200</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp; Fixed various collectd memory 
leaks.<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Once I understood what's 
going on I tried to keep the changes to a minimum.<BR></FONT></SPAN><FONT 
face=Arial color=#0000ff size=2></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>diff --git a/src/collectd.c b/src/collectd.c<BR>index 
277d3b0..f5df460 100644<BR>--- a/src/collectd.c<BR>+++ b/src/collectd.c<BR>@@ 
-77,6 +77,7 @@ static void sig_usr1_handler (int __attribute__((unused)) 
signal)<BR>&nbsp;&nbsp;pthread_attr_init 
(&amp;attr);<BR>&nbsp;&nbsp;pthread_attr_setdetachstate (&amp;attr, 
PTHREAD_CREATE_DETACHED);<BR>&nbsp;&nbsp;pthread_create (&amp;thread, &amp;attr, 
do_flush, NULL);<BR>+&nbsp;pthread_attr_destroy 
(&amp;attr);<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;static int init_hostname 
(void)<BR>diff --git a/src/exec.c b/src/exec.c<BR>index 322ff67..265ec01 
100644<BR>--- a/src/exec.c<BR>+++ b/src/exec.c<BR>@@ -827,6 +827,7 @@ static int 
exec_read (void) /* {{{ */<BR>&nbsp;&nbsp;&nbsp;&nbsp; pthread_attr_init 
(&amp;attr);<BR>&nbsp;&nbsp;&nbsp;&nbsp; pthread_attr_setdetachstate (&amp;attr, 
PTHREAD_CREATE_DETACHED);<BR>&nbsp;&nbsp;&nbsp;&nbsp; pthread_create (&amp;t, 
&amp;attr, exec_read_one, (void *) pl);<BR>+&nbsp;&nbsp;&nbsp; 
pthread_attr_destroy(&amp;attr);<BR>&nbsp;&nbsp; } /* for (pl) 
*/<BR>&nbsp;<BR>&nbsp;&nbsp; return (0);<BR>@@ -870,6 +871,7 @@ static int 
exec_notification (const notification_t *n, /* {{{ 
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp; pthread_attr_init 
(&amp;attr);<BR>&nbsp;&nbsp;&nbsp;&nbsp; pthread_attr_setdetachstate (&amp;attr, 
PTHREAD_CREATE_DETACHED);<BR>&nbsp;&nbsp;&nbsp;&nbsp; pthread_create (&amp;t, 
&amp;attr, exec_notification_one, (void *) pln);<BR>+&nbsp;&nbsp;&nbsp; 
pthread_attr_destroy (&amp;attr);<BR>&nbsp;&nbsp; } /* for (pl) 
*/<BR>&nbsp;<BR>&nbsp;&nbsp; return (0);<BR>diff --git a/src/meta_data.c 
b/src/meta_data.c<BR>index 6a336c4..9307e5e 100644<BR>--- 
a/src/meta_data.c<BR>+++ b/src/meta_data.c<BR>@@ -214,6 +214,7 @@ void 
meta_data_destroy (meta_data_t *md) /* {{{ */<BR>&nbsp;&nbsp; if (md == 
NULL)<BR>&nbsp;&nbsp;&nbsp;&nbsp; return;<BR>&nbsp;<BR>+&nbsp; 
pthread_mutex_destroy(&amp;md-&gt;lock);<BR>&nbsp;&nbsp; md_entry_free 
(md-&gt;head);<BR>&nbsp;&nbsp; free (md);<BR>&nbsp;} /* }}} void 
meta_data_destroy */<BR>diff --git a/src/unixsock.c b/src/unixsock.c<BR>index 
1010b59..dea8be0 100644<BR>--- a/src/unixsock.c<BR>+++ b/src/unixsock.c<BR>@@ 
-187,6 +187,7 @@ static void *us_handle_client (void 
*arg)<BR>&nbsp;&nbsp;&nbsp;close (fdin);<BR>&nbsp;&nbsp;&nbsp;close 
(fdout);<BR>&nbsp;&nbsp;&nbsp;pthread_exit ((void *) 1);<BR>+&nbsp;&nbsp;return 
((void *) 0);<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;fhout = fdopen (fdout, 
"w");<BR>@@ -198,6 +199,7 @@ static void *us_handle_client (void 
*arg)<BR>&nbsp;&nbsp;&nbsp;fclose (fhin); /* this closes fdin as well 
*/<BR>&nbsp;&nbsp;&nbsp;close (fdout);<BR>&nbsp;&nbsp;&nbsp;pthread_exit ((void 
*) 1);<BR>+&nbsp;&nbsp;return ((void *) 
0);<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;/* change output buffer to line 
buffered mode */<BR>@@ -209,6 +211,7 @@ static void *us_handle_client (void 
*arg)<BR>&nbsp;&nbsp;&nbsp;fclose (fhin);<BR>&nbsp;&nbsp;&nbsp;fclose 
(fhout);<BR>&nbsp;&nbsp;&nbsp;pthread_exit ((void *) 1);<BR>+&nbsp;&nbsp;return 
((void *) 0);<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;while (42)<BR>@@ -253,6 
+256,7 @@ static void *us_handle_client (void 
*arg)<BR>&nbsp;&nbsp;&nbsp;&nbsp;fclose 
(fhin);<BR>&nbsp;&nbsp;&nbsp;&nbsp;fclose 
(fhout);<BR>&nbsp;&nbsp;&nbsp;&nbsp;pthread_exit ((void *) 
1);<BR>+&nbsp;&nbsp;&nbsp;return ((void *) 
0);<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;if (strcasecmp 
(fields[0], "getval") == 0)<BR>@@ -307,9 +311,13 @@ static void 
*us_server_thread (void __attribute__((unused)) *arg)<BR>&nbsp;&nbsp;pthread_t 
th;<BR>&nbsp;&nbsp;pthread_attr_t th_attr;<BR>&nbsp;<BR>+&nbsp;pthread_attr_init 
(&amp;th_attr);<BR>+&nbsp;pthread_attr_setdetachstate (&amp;th_attr, 
PTHREAD_CREATE_DETACHED);<BR>+<BR>&nbsp;&nbsp;if (us_open_socket () != 
0)<BR>&nbsp;&nbsp;&nbsp;pthread_exit ((void *) 
1);<BR>&nbsp;<BR>+<BR>&nbsp;&nbsp;while (loop != 
0)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;DEBUG ("unixsock plugin: Calling 
accept..");<BR>@@ -325,6 +333,7 @@ static void *us_server_thread (void 
__attribute__((unused)) *arg)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sstrerror 
(errno, errbuf, sizeof (errbuf)));<BR>&nbsp;&nbsp;&nbsp;&nbsp;close 
(sock_fd);<BR>&nbsp;&nbsp;&nbsp;&nbsp;sock_fd = 
-1;<BR>+&nbsp;&nbsp;&nbsp;pthread_attr_destroy(&amp;th_attr);<BR>&nbsp;&nbsp;&nbsp;&nbsp;pthread_exit \
 ((void *) 1);<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;<BR>@@ -341,9 +350,6 @@ static 
void *us_server_thread (void __attribute__((unused)) 
*arg)<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;DEBUG ("Spawning child to handle connection 
on fd #%i", *remote_fd);<BR>&nbsp;<BR>-&nbsp;&nbsp;pthread_attr_init 
(&amp;th_attr);<BR>-&nbsp;&nbsp;pthread_attr_setdetachstate (&amp;th_attr, 
PTHREAD_CREATE_DETACHED);<BR>-<BR>&nbsp;&nbsp;&nbsp;status = pthread_create 
(&amp;th, &amp;th_attr, us_handle_client, (void *) 
remote_fd);<BR>&nbsp;&nbsp;&nbsp;if (status != 0)<BR>&nbsp;&nbsp;&nbsp;{<BR>@@ 
-358,6 +364,7 @@ static void *us_server_thread (void __attribute__((unused)) 
*arg)<BR>&nbsp;<BR>&nbsp;&nbsp;close (sock_fd);<BR>&nbsp;&nbsp;sock_fd = 
-1;<BR>+&nbsp;pthread_attr_destroy(&amp;th_attr);<BR>&nbsp;<BR>&nbsp;&nbsp;status 
= unlink ((sock_file != NULL) ? sock_file : US_DEFAULT_PATH);<BR>&nbsp;&nbsp;if 
(status != 0)<BR>diff --git a/src/utils_cmd_listval.c 
b/src/utils_cmd_listval.c<BR>index 4ca9646..f923fca 100644<BR>--- 
a/src/utils_cmd_listval.c<BR>+++ b/src/utils_cmd_listval.c<BR>@@ -89,8 +89,9 @@ 
int handle_listval (FILE *fh, char *buffer)<BR>&nbsp;<BR>&nbsp;&nbsp; 
print_to_socket (fh, "%i Value%s 
found\n",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (int) number, (number == 1) ? 
"" : "s");<BR>-&nbsp; for (i = 0; i &lt; number; i++)<BR>+&nbsp; for (i = 0; i 
&lt; number; i++) {<BR>&nbsp;&nbsp;&nbsp;&nbsp; print_to_socket (fh, "%u %s\n", 
(unsigned int) times[i], names[i]);<BR>+&nbsp; }<BR>&nbsp;<BR>&nbsp;&nbsp; 
free_everything_and_return (0);<BR>&nbsp;} /* int handle_listval */<BR>diff 
--git a/src/utils_fbhash.c b/src/utils_fbhash.c<BR>index d20b7e3..9f1058b 
100644<BR>--- a/src/utils_fbhash.c<BR>+++ b/src/utils_fbhash.c<BR>@@ -234,6 
+234,7 @@ void fbh_destroy (fbhash_t *h) /* {{{ */<BR>&nbsp;&nbsp; if (h == 
NULL)<BR>&nbsp;&nbsp;&nbsp;&nbsp; return;<BR>&nbsp;<BR>+&nbsp; 
pthread_mutex_destroy(&amp;h-&gt;lock);<BR>&nbsp;&nbsp; free 
(h-&gt;filename);<BR>&nbsp;&nbsp; fbh_free_tree (h-&gt;tree);<BR>&nbsp;} /* }}} 
void fbh_destroy */</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>commit 402e0a1746a67e47619ffc4ce2ad6317e8884cfe<BR>Author: 
Gerrie Roos &lt;<A 
href="mailto:groos@xiplink.com">groos@xiplink.com</A>&gt;<BR>Date:&nbsp;&nbsp; 
Tue Apr 17 15:22:36 2012 +0200</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;Fixed collectd's unixsock read 
interrupted by SIGCHLD's.</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>diff --git a/src/unixsock.c b/src/unixsock.c<BR>index 
0b89748..1010b59 100644<BR>--- a/src/unixsock.c<BR>+++ b/src/unixsock.c<BR>@@ 
-222,6 +222,9 @@ static void *us_handle_client (void 
*arg)<BR>&nbsp;&nbsp;&nbsp;errno = 0;<BR>&nbsp;&nbsp;&nbsp;if (fgets (buffer, 
sizeof (buffer), fhin) == NULL)<BR>&nbsp;&nbsp;&nbsp;{<BR>+&nbsp;&nbsp;&nbsp;if 
(errno == 
EINTR)<BR>+&nbsp;&nbsp;&nbsp;&nbsp;continue;<BR>+<BR>&nbsp;&nbsp;&nbsp;&nbsp;if 
(errno != 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;char 
errbuf[1024];</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>commit 9f4c960f94bc70d680400b50a84655f288e7e96d<BR>Author: 
Gerrie Roos &lt;<A 
href="mailto:groos@xiplink.com">groos@xiplink.com</A>&gt;<BR>Date:&nbsp;&nbsp; 
Tue Jan 10 09:00:42 2012 +0200</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;Fixed collectd exec module: 
incorrectly exited select loop on signal.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>diff --git a/src/exec.c b/src/exec.c<BR>index 
c64f949..322ff67 100644<BR>--- a/src/exec.c<BR>+++ b/src/exec.c<BR>@@ -584,8 
+584,15 @@ static void *exec_read_one (void *arg) /* {{{ */<BR>&nbsp;&nbsp; /* 
We use a copy of fdset, as select modifies it */<BR>&nbsp;&nbsp; copy = 
fdset;<BR>&nbsp;<BR>-&nbsp; while (select(highest_fd + 1, &amp;copy, NULL, NULL, 
NULL ) &gt; 0)<BR>+&nbsp; while (1)<BR>&nbsp;&nbsp; {<BR>+&nbsp;&nbsp;&nbsp; int 
e = select(highest_fd + 1, &amp;copy, NULL, NULL, NULL );<BR>+&nbsp;&nbsp;&nbsp; 
if (e &lt; 0) {<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (errno == 
EINTR)<BR>+&nbsp;continue;<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>+&nbsp;&nbsp;&nbsp; }<BR>+<BR>&nbsp;&nbsp;&nbsp;&nbsp; int 
len;<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp; if (FD_ISSET(fd, 
&amp;copy))</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>commit 27dd489e1242af63d2df04dfe627c440512e8da1<BR>Author: 
Gerrie Roos &lt;<A 
href="mailto:groos@xiplink.com">groos@xiplink.com</A>&gt;<BR>Date:&nbsp;&nbsp; 
Tue Dec 20 06:30:59 2011 +0200</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;Fixed incorrect collectd warning 
when configuring network plugin.</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>diff --git a/src/network.c b/src/network.c<BR>index 
412b457..aa1c858 100644<BR>--- a/src/network.c<BR>+++ b/src/network.c<BR>@@ 
-1685,9 +1685,9 @@ static int network_set_interface (const sockent_t *se, const 
struct addrinfo *ai<BR>&nbsp;&nbsp;}<BR>&nbsp;<BR>&nbsp;&nbsp;/* else: Not a 
multicast interface. */<BR>-#if defined(HAVE_IF_INDEXTONAME) &amp;&amp; 
HAVE_IF_INDEXTONAME &amp;&amp; defined(SO_BINDTODEVICE)<BR>&nbsp;&nbsp;if 
(se-&gt;interface != 0)<BR>&nbsp;&nbsp;{<BR>+#if defined(HAVE_IF_INDEXTONAME) 
&amp;&amp; HAVE_IF_INDEXTONAME &amp;&amp; 
defined(SO_BINDTODEVICE)<BR>&nbsp;&nbsp;&nbsp;char 
interface_name[IFNAMSIZ];<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;if (if_indextoname 
(se-&gt;interface, interface_name) == NULL)<BR>@@ -1704,11 +1704,10 @@ static 
int network_set_interface (const sockent_t *se, const struct addrinfo 
*ai<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sstrerror (errno, errbuf, sizeof 
(errbuf)));<BR>&nbsp;&nbsp;&nbsp;&nbsp;return 
(-1);<BR>&nbsp;&nbsp;&nbsp;}<BR>-&nbsp;}<BR>&nbsp;/* #endif HAVE_IF_INDEXTONAME 
&amp;&amp; SO_BINDTODEVICE */<BR>&nbsp;<BR>&nbsp;#else<BR>-&nbsp;WARNING 
("network plugin: Cannot set the interface on a unicast 
"<BR>+&nbsp;&nbsp;WARNING ("network plugin: Cannot set the interface on a 
unicast "<BR>&nbsp;&nbsp;&nbsp;&nbsp;"socket because "<BR>&nbsp;# if 
!defined(SO_BINDTODEVICE)<BR>&nbsp;&nbsp;&nbsp;&nbsp;"the the 
\"SO_BINDTODEVICE\" socket option "<BR>@@ -1718,6 +1717,8 @@ static int 
network_set_interface (const sockent_t *se, const struct addrinfo 
*ai<BR>&nbsp;&nbsp;&nbsp;&nbsp;"is not available on your 
system.");<BR>&nbsp;#endif<BR>&nbsp;<BR>+&nbsp;}<BR>+<BR>&nbsp;&nbsp;return 
(0);<BR>&nbsp;} /* }}} network_set_interface */<BR>&nbsp;<BR>commit 
641dc2dd4c595ede24c3997e4aa9db5c4528a2cd<BR>Author: Gerrie Roos &lt;<A 
href="mailto:groos@xiplink.com">groos@xiplink.com</A>&gt;<BR>Date:&nbsp;&nbsp; 
Wed May 25 18:28:55 2011 +0200</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;&nbsp;&nbsp; Collectd's scale plugin now supports 
scaling only on specific data sources, yay!</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>diff --git a/src/target_scale.c 
b/src/target_scale.c<BR>index 29fecdf..a8d7038 100644<BR>--- 
a/src/target_scale.c<BR>+++ b/src/target_scale.c<BR>@@ -29,6 +29,9 @@ struct 
ts_data_s<BR>&nbsp;{<BR>&nbsp;&nbsp;double factor;<BR>&nbsp;&nbsp;double 
offset;<BR>+<BR>+&nbsp;char **data_sources;<BR>+&nbsp;size_t 
data_sources_num;<BR>&nbsp;};<BR>&nbsp;typedef struct ts_data_s 
ts_data_t;<BR>&nbsp;<BR>@@ -300,6 +303,67 @@ static int ts_config_set_double 
(double *ret, oconfig_item_t *ci) /* {{{ */<BR>&nbsp;&nbsp;return 
(0);<BR>&nbsp;} /* }}} int ts_config_set_double */<BR>&nbsp;<BR>+static int 
ts_config_add_data_source(ts_data_t *data, /* {{{ 
*/<BR>+&nbsp;&nbsp;oconfig_item_t *ci)<BR>+{<BR>+&nbsp;size_t 
new_data_sources_num;<BR>+&nbsp;char **temp;<BR>+&nbsp;int i;<BR>+<BR>+&nbsp;/* 
Check number of arbuments. */<BR>+&nbsp;if (ci-&gt;values_num &lt; 
1)<BR>+&nbsp;{<BR>+&nbsp;&nbsp;ERROR ("`value' match: `%s' needs at least one 
argument.",<BR>+&nbsp;&nbsp;&nbsp;&nbsp;ci-&gt;key);<BR>+&nbsp;&nbsp;return 
(-1);<BR>+&nbsp;}<BR>+<BR>+&nbsp;/* Check type of arguments */<BR>+&nbsp;for (i 
= 0; i &lt; ci-&gt;values_num; i++)<BR>+&nbsp;{<BR>+&nbsp;&nbsp;if 
(ci-&gt;values[i].type == 
OCONFIG_TYPE_STRING)<BR>+&nbsp;&nbsp;&nbsp;continue;<BR>+<BR>+&nbsp;&nbsp;ERROR 
("`value' match: `%s' accepts only string arguments 
"<BR>+&nbsp;&nbsp;&nbsp;&nbsp;"(argument %i is a 
%s).",<BR>+&nbsp;&nbsp;&nbsp;&nbsp;ci-&gt;key, i + 
1,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;(ci-&gt;values[i].type == 
OCONFIG_TYPE_BOOLEAN)<BR>+&nbsp;&nbsp;&nbsp;&nbsp;? "truth value" : 
"number");<BR>+&nbsp;&nbsp;return (-1);<BR>+&nbsp;}<BR>+<BR>+&nbsp;/* Allocate 
space for the char pointers */<BR>+&nbsp;new_data_sources_num = 
data-&gt;data_sources_num + ((size_t) ci-&gt;values_num);<BR>+&nbsp;temp = (char 
**) realloc (data-&gt;data_sources,<BR>+&nbsp;&nbsp;&nbsp;new_data_sources_num * 
sizeof (char *));<BR>+&nbsp;if (temp == NULL)<BR>+&nbsp;{<BR>+&nbsp;&nbsp;ERROR 
("`value' match: realloc failed.");<BR>+&nbsp;&nbsp;return 
(-1);<BR>+&nbsp;}<BR>+&nbsp;data-&gt;data_sources = temp;<BR>+<BR>+&nbsp;/* Copy 
the strings, allocating memory as needed.&nbsp; */<BR>+&nbsp;for (i = 0; i &lt; 
ci-&gt;values_num; i++)<BR>+&nbsp;{<BR>+&nbsp;&nbsp;size_t 
j;<BR>+<BR>+&nbsp;&nbsp;/* If we get here, there better be memory for us to 
write to.&nbsp; */<BR>+&nbsp;&nbsp;assert (data-&gt;data_sources_num &lt; 
new_data_sources_num);<BR>+<BR>+&nbsp;&nbsp;j = 
data-&gt;data_sources_num;<BR>+&nbsp;&nbsp;data-&gt;data_sources[j] = sstrdup 
(ci-&gt;values[i].value.string);<BR>+&nbsp;&nbsp;if (data-&gt;data_sources[j] == 
NULL)<BR>+&nbsp;&nbsp;{<BR>+&nbsp;&nbsp;&nbsp;ERROR ("`value' match: sstrdup 
failed.");<BR>+&nbsp;&nbsp;&nbsp;continue;<BR>+&nbsp;&nbsp;}<BR>+&nbsp;&nbsp;data-&gt;data_sources_num++;<BR>+&nbsp;}<BR>+<BR>+&nbsp;return \
 (0);<BR>+} /* }}} int ts_config_add_data_source */<BR>+<BR>&nbsp;static int 
ts_destroy (void **user_data) /* {{{ */<BR>&nbsp;{<BR>&nbsp;&nbsp;ts_data_t 
**data;<BR>@@ -309,6 +373,13 @@ static int ts_destroy (void **user_data) /* {{{ 
*/<BR>&nbsp;<BR>&nbsp;&nbsp;data = (ts_data_t **) 
user_data;<BR>&nbsp;<BR>+&nbsp;if (*data &amp;&amp; (*data)-&gt;data_sources) 
{<BR>+&nbsp;&nbsp;size_t i;<BR>+&nbsp;&nbsp;for (i = 0; i &lt; 
(*data)-&gt;data_sources_num; 
i++)<BR>+&nbsp;&nbsp;&nbsp;free((*data)-&gt;data_sources[i]);<BR>+&nbsp;&nbsp;free((*data)-&gt;data_sources);<BR>+&nbsp;}<BR>+<BR>&nbsp;&nbsp;free \
 (*data);<BR>&nbsp;&nbsp;*data = NULL;<BR>&nbsp;<BR>@@ -341,6 +412,8 @@ static 
int ts_create (const oconfig_item_t *ci, void **user_data) /* {{{ 
*/<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status = ts_config_set_double 
(&amp;data-&gt;factor, child);<BR>&nbsp;&nbsp;&nbsp;else if (strcasecmp 
("Offset", child-&gt;key) == 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;status = 
ts_config_set_double (&amp;data-&gt;offset, child);<BR>+&nbsp;&nbsp;else if 
(strcasecmp ("DataSource", child-&gt;key) == 
0)<BR>+&nbsp;&nbsp;&nbsp;&nbsp;status = ts_config_add_data_source(data, 
child);<BR>&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;ERROR \
 ("Target `scale': The `%s' configuration option is not understood "<BR>@@ -393,6 
+466,18 @@ static int ts_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ 
*/<BR>&nbsp;<BR>&nbsp;&nbsp;for (i = 0; i &lt; ds-&gt;ds_num; 
i++)<BR>&nbsp;&nbsp;{<BR>+&nbsp;&nbsp;/* If we've got a list of data sources, is 
it in the list? */<BR>+&nbsp;&nbsp;if (data-&gt;data_sources) 
{<BR>+&nbsp;&nbsp;&nbsp;size_t j;<BR>+&nbsp;&nbsp;&nbsp;for (j = 0; j &lt; 
data-&gt;data_sources_num; j++)<BR>+&nbsp;&nbsp;&nbsp;&nbsp;if 
(strcasecmp(ds-&gt;ds[i].name, data-&gt;data_sources[j]) == 
0)<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>+<BR>+&nbsp;&nbsp;&nbsp;/* No 
match, ignore */<BR>+&nbsp;&nbsp;&nbsp;if (j &gt;= 
data-&gt;data_sources_num)<BR>+&nbsp;&nbsp;&nbsp;&nbsp;continue;<BR>+&nbsp;&nbsp;}<BR>+<BR>&nbsp;&nbsp;&nbsp;if \
 (ds-&gt;ds[i].type == 
DS_TYPE_COUNTER)<BR>&nbsp;&nbsp;&nbsp;&nbsp;ts_invoke_counter (ds, vl, data, 
i);<BR>&nbsp;&nbsp;&nbsp;else if (ds-&gt;ds[i].type == 
DS_TYPE_GAUGE)</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>&nbsp;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>Hope you find this useful,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2>gerrie</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=609501520-30052012><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> David Halko [mailto:davidhalko@gmail.com] 
<BR><B>Sent:</B> 25 May 2012 09:23 PM<BR><B>To:</B> 
groos@xiplink.com<BR><B>Cc:</B> collectd@verplant.org<BR><B>Subject:</B> Re: 
[collectd] Unixsock plugin memleaks<BR></FONT><BR></DIV>
<DIV></DIV>It sounds like a good deal, if you share the changed, <BR>if you have 
fixed some memory leaks!!!<BR><BR>Dave<BR><A 
href="http://netmgt.blogspot.com/">http://netmgt.blogspot.com/</A><BR><BR>
<DIV class=gmail_quote>On Thu, May 24, 2012 at 11:21 AM, Gerrie Roos <SPAN 
dir=ltr>&lt;<A href="mailto:groos@xiplink.com" 
target=_blank>groos@xiplink.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi 
  ppl<BR><BR>I've been chasing some memory leaks in the unixsock plugin (already 
  found a<BR>couple) but there might still be some leaks. &nbsp;Has anybody been 
  working on<BR>this plugin recently? &nbsp;I'd be happy to share what I've got 
  so 
  far.<BR><BR>gerrie<BR>_______________________________________________<BR>collectd 
  mailing list<BR><A 
  href="mailto:collectd@verplant.org">collectd@verplant.org</A><BR><A 
  href="http://mailman.verplant.org/listinfo/collectd" 
  target=_blank>http://mailman.verplant.org/listinfo/collectd</A><BR></BLOCKQUOTE></DIV>
 <HR noShade SIZE=1>
<A></A>
<P class="" align=left color="#000000" avgcert??>No virus found in this 
message.<BR>Checked by AVG - <A 
href="http://www.avg.com">www.avg.com</A><BR>Version: 2012.0.2176 / Virus 
Database: 2425/5022 - Release Date: 05/25/12</P></BODY></HTML>



_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic