- INFO ("unixsock plugin: flushing all data");
- plugin_flush_all (timeout);
- INFO ("unixsock plugin: finished flushing all data");
+ if ((endptr == value) || (0 != errno))
+ status = -1;
+ else if (0 >= timeout)
+ timeout = -1;
+ }
+ else
+ status = -1;
+
+ if (status != 0)
+ {
+ print_to_socket (fh, "-1 Cannot parse option %s\n", option);
+ return (-1);
+ }
+ }
+
+ if ((success + error) > 0)
+ {
+ print_to_socket (fh, "0 Done: %i successful, %i errors\n",
+ success, error);
+ }
+ else
+ {
+ plugin_flush_all (timeout);
+ print_to_socket (fh, "0 Done\n");
+ }