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)
 
  #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;