[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: Revert "core: fix schedule_new_event now returns a ptr to timed_event"

git at icinga.org git at icinga.org
Tue Aug 7 18:40:56 CEST 2012


Module: icinga-core
Branch: mfriedrich/core
Commit: 3365659a89b97b8c717a130435bf244b6e9d4fbb
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=3365659a89b97b8c717a130435bf244b6e9d4fbb

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Tue Aug  7 18:37:51 2012 +0200

Revert "core: fix schedule_new_event now returns a ptr to timed_event"

This reverts commit 515b7b66f315523e9860355b8edc4d15e367150d.

---

 base/commands.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/base/commands.c b/base/commands.c
index d1c9cce..cf79df3 100644
--- a/base/commands.c
+++ b/base/commands.c
@@ -2026,6 +2026,7 @@ int cmd_schedule_host_service_checks(int cmd, char *args, int force) {
 int cmd_signal_process(int cmd, char *args) {
 	time_t scheduled_time = 0L;
 	char *temp_ptr = NULL;
+	int result = OK;
 
 	/* get the time to schedule the event */
 	if ((temp_ptr = my_strtok(args, "\n")) == NULL)
@@ -2034,10 +2035,9 @@ int cmd_signal_process(int cmd, char *args) {
 		scheduled_time = strtoul(temp_ptr, NULL, 10);
 
 	/* add a scheduled program shutdown or restart to the event list */
-	if (!schedule_new_event((cmd == CMD_SHUTDOWN_PROCESS) ? EVENT_PROGRAM_SHUTDOWN : EVENT_PROGRAM_RESTART, TRUE, scheduled_time, FALSE, 0, NULL, FALSE, NULL, NULL, 0))
-		return ERROR;
+	result = schedule_new_event((cmd == CMD_SHUTDOWN_PROCESS) ? EVENT_PROGRAM_SHUTDOWN : EVENT_PROGRAM_RESTART, TRUE, scheduled_time, FALSE, 0, NULL, FALSE, NULL, NULL, 0);
 
-	return OK;
+	return result;
 }
 
 





More information about the icinga-checkins mailing list