else if (strcasecmp(value, "Okay") == 0)
n->severity = NOTIF_OKAY;
else
else if (strcasecmp(value, "Okay") == 0)
n->severity = NOTIF_OKAY;
else
} /* int set_option_severity */
static int set_option_time(notification_t *n, const char *value) {
} /* int set_option_severity */
static int set_option_time(notification_t *n, const char *value) {
|| (endptr == value) /* Invalid string */
|| (endptr == NULL) /* This should not happen */
|| (*endptr != 0)) /* Trailing chars */
|| (endptr == value) /* Invalid string */
|| (endptr == NULL) /* This should not happen */
|| (*endptr != 0)) /* Trailing chars */
} /* int set_option_time */
static int set_option(notification_t *n, const char *option,
const char *value) {
if ((n == NULL) || (option == NULL) || (value == NULL))
} /* int set_option_time */
static int set_option(notification_t *n, const char *option,
const char *value) {
if ((n == NULL) || (option == NULL) || (value == NULL))
DEBUG("utils_cmd_putnotif: set_option (option = %s, value = %s);", option,
value);
DEBUG("utils_cmd_putnotif: set_option (option = %s, value = %s);", option,
value);
else if (strcasecmp("message", option) == 0)
sstrncpy(n->message, value, sizeof(n->message));
else if (strcasecmp("host", option) == 0)
else if (strcasecmp("message", option) == 0)
sstrncpy(n->message, value, sizeof(n->message));
else if (strcasecmp("host", option) == 0)
else if (strcasecmp("type_instance", option) == 0)
sstrncpy(n->type_instance, value, sizeof(n->type_instance));
else
else if (strcasecmp("type_instance", option) == 0)
sstrncpy(n->type_instance, value, sizeof(n->type_instance));
else
status = parse_string(&buffer, &command);
if (status != 0) {
print_to_socket(fh, "-1 Cannot parse command.\n");
status = parse_string(&buffer, &command);
if (status != 0) {
print_to_socket(fh, "-1 Cannot parse command.\n");
}
assert(command != NULL);
if (strcasecmp("PUTNOTIF", command) != 0) {
print_to_socket(fh, "-1 Unexpected command: `%s'.\n", command);
}
assert(command != NULL);
if (strcasecmp("PUTNOTIF", command) != 0) {
print_to_socket(fh, "-1 Unexpected command: `%s'.\n", command);