Merge branch 'collectd-4.4' into collectd-4.5
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 3 Oct 2008 21:14:44 +0000 (23:14 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 3 Oct 2008 21:14:44 +0000 (23:14 +0200)
Conflicts:

src/utils_ignorelist.c

src/collectd.conf.pod
src/collectdmon.c
src/ipvs.c
src/utils_ignorelist.c

index e415ce9..0df5c3b 100644 (file)
@@ -1972,6 +1972,9 @@ hosts sends it's CPU statistics to the server every 60 seconds, a notification
 will be dispatched after about 120 seconds. It may take a little longer because
 the timeout is checked only once each B<Interval> on the server.
 
+When a value comes within range again or is received after it was missing, an
+"OKAY-notification" is dispatched.
+
 Here is a configuration example to get you started. Read below for more
 information.
 
index e496eb0..015344f 100644 (file)
@@ -331,12 +331,6 @@ int main (int argc, char **argv)
                return 1;
        }
 
-       sigaddset (&sa.sa_mask, SIGCHLD);
-       if (0 != sigprocmask (SIG_BLOCK, &sa.sa_mask, NULL)) {
-               syslog (LOG_ERR, "Error: sigprocmask() failed: %s", strerror (errno));
-               return 1;
-       }
-
        while (0 == loop) {
                int status = 0;
 
index 10c4d15..85e65d2 100644 (file)
@@ -280,7 +280,7 @@ static void cipvs_submit_dest (char *pi, struct ip_vs_dest_entry *de) {
 
        char ti[DATA_MAX_NAME_LEN];
 
-       if (0 != get_ti (de, ti, DATA_MAX_NAME_LEN))
+       if (0 != get_ti (de, ti, sizeof (ti)))
                return;
 
        cipvs_submit_connections (pi, ti, stats.conns);
@@ -298,7 +298,7 @@ static void cipvs_submit_service (struct ip_vs_service_entry *se)
 
        int i = 0;
 
-       if (0 != get_pi (se, pi, DATA_MAX_NAME_LEN))
+       if (0 != get_pi (se, pi, sizeof (pi)))
                return;
 
        cipvs_submit_connections (pi, NULL, stats.conns);
index db679da..de42d0f 100644 (file)
@@ -306,12 +306,12 @@ int ignorelist_add (ignorelist_t *il, const char *entry)
        if ((entry_len > 2) && (entry[0] == '/') && entry[entry_len - 1] == '/')
        {
                char *entry_copy;
+               size_t entry_copy_size;
 
                /* We need to copy `entry' since it's const */
-               entry_copy = smalloc (entry_len);
-               memset (entry_copy, '\0', entry_len);
-               /* sstrncpy() overwrites the trailing '/' */
-               sstrncpy (entry_copy, entry + 1, entry_len - 1);
+               entry_copy_size = entry_len - 1;
+               entry_copy = smalloc (entry_copy_size);
+               sstrncpy (entry_copy, entry + 1, entry_copy_size);
 
                DEBUG("I'm about to add regex entry: %s", entry_copy);
                ret = ignorelist_append_regex(il, entry_copy);