Code

Merge branch 'collectd-4.4'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 13 May 2008 10:54:48 +0000 (12:54 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 13 May 2008 10:54:48 +0000 (12:54 +0200)
1  2 
src/collectd.c
src/iptables.c
src/powerdns.c
src/teamspeak2.c
src/unixsock.c
src/utils_cmd_putval.c
src/utils_threshold.c

diff --cc src/collectd.c
Simple merge
diff --cc src/iptables.c
Simple merge
diff --cc src/powerdns.c
index 672b505c7af0f1276eea7da0b8a691757e341332,51e39ee245e87b2deb4d9e51e706df1147c26a3e..9d93f93dee4d4c22349195d54ce1b81e61f8e518
@@@ -852,16 -859,8 +859,9 @@@ static int powerdns_config_add_server (
        break;
      }
  
-     if (item->command == NULL)
-     {
-       ERROR ("powerdns plugin: item->command == NULL.");
-       status = -1;
-       break;
-     }
      item->sockaddr.sun_family = AF_UNIX;
 -    sstrncpy (item->sockaddr.sun_path, socket_temp, UNIX_PATH_MAX);
 +    sstrncpy (item->sockaddr.sun_path, socket_temp,
 +      sizeof (item->sockaddr.sun_path));
  
      e = llentry_create (item->instance, item);
      if (e == NULL)
Simple merge
diff --cc src/unixsock.c
Simple merge
index 023e4a7111efffc14cd1542e1eeae39a263127d5,755238815f57c15a4e63f9c0a830b8cb1abf05b3..8fbc8de3469325005c4cf6d59dac0eb8d863d2e2
  #include "common.h"
  #include "plugin.h"
  
+ #define print_to_socket(fh, ...) \
+       if (fprintf (fh, __VA_ARGS__) < 0) { \
+               char errbuf[1024]; \
+               WARNING ("handle_putval: failed to write to socket #%i: %s", \
+                               fileno (fh), sstrerror (errno, errbuf, sizeof (errbuf))); \
+               return -1; \
+       }
  static int parse_value (const data_set_t *ds, value_list_t *vl,
 -              const char *type,
                FILE *fh, char *buffer)
  {
        char *dummy;
Simple merge