+ if (strcasecmp ("plugin", opt_key) == 0)
+ {
+ add_to_array (&plugins, &plugins_num, opt_value);
+ }
+ else if (strcasecmp ("identifier", opt_key) == 0)
+ {
+ add_to_array (&identifiers, &identifiers_num, opt_value);
+ }
+ else if (strcasecmp ("timeout", opt_key) == 0)
+ {
+ char *endptr;
+
+ errno = 0;
+ endptr = NULL;
+ timeout = strtod (opt_value, &endptr);
+
+ if ((endptr == opt_value) || (errno != 0) || (!isfinite (timeout)))
+ {
+ print_to_socket (fh, "-1 Invalid value for option `timeout': "
+ "%s\n", opt_value);
+ sfree (plugins);
+ sfree (identifiers);
+ return (-1);
+ }
+ else if (timeout < 0.0)
+ {
+ timeout = 0.0;
+ }
+ }
+ else
+ {
+ print_to_socket (fh, "-1 Cannot parse option %s\n", opt_key);
+ sfree (plugins);
+ sfree (identifiers);
+ return (-1);
+ }
+ } /* while (*buffer != 0) */
+
+ /* Add NULL entries for `any plugin' and/or `any value' if nothing was
+ * specified. */
+ if (plugins_num == 0)
+ add_to_array (&plugins, &plugins_num, NULL);
+
+ if (identifiers_num == 0)
+ add_to_array (&identifiers, &identifiers_num, NULL);
+
+ for (i = 0; i < plugins_num; i++)