From b5abe48ea68bbc03e32a6f7487a804b4d666f9c2 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 1 Dec 2006 17:26:32 +0000 Subject: [PATCH] Fix for bug #2068 - removing or rescheduling a playlist will still play the playlist because the scheduler is not signalled. --- .../src/products/scheduler/src/RemoveFromScheduleMethod.cxx | 6 +++++- campcaster/src/products/scheduler/src/RescheduleMethod.cxx | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/campcaster/src/products/scheduler/src/RemoveFromScheduleMethod.cxx b/campcaster/src/products/scheduler/src/RemoveFromScheduleMethod.cxx index 1ebf33090..7a10ae63c 100644 --- a/campcaster/src/products/scheduler/src/RemoveFromScheduleMethod.cxx +++ b/campcaster/src/products/scheduler/src/RemoveFromScheduleMethod.cxx @@ -44,6 +44,7 @@ #include "ScheduleInterface.h" #include "ScheduleFactory.h" +#include "SchedulerDaemon.h" #include "LiveSupport/Core/XmlRpcTools.h" #include "RemoveFromScheduleMethod.h" @@ -135,7 +136,10 @@ RemoveFromScheduleMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, return; } schedule->removeFromSchedule(entryId); - + + // tell the scheduler daemon to reload the scheduled events + Ptr::Ref scheduler = SchedulerDaemon::getInstance(); + scheduler->update(); } catch (std::invalid_argument &e) { XmlRpcTools::markError(errorId+3, "schedule entry not found", returnValue); diff --git a/campcaster/src/products/scheduler/src/RescheduleMethod.cxx b/campcaster/src/products/scheduler/src/RescheduleMethod.cxx index ffcd179a4..47921999e 100644 --- a/campcaster/src/products/scheduler/src/RescheduleMethod.cxx +++ b/campcaster/src/products/scheduler/src/RescheduleMethod.cxx @@ -44,6 +44,7 @@ #include "ScheduleInterface.h" #include "ScheduleFactory.h" +#include "SchedulerDaemon.h" #include "LiveSupport/Core/XmlRpcTools.h" #include "RescheduleMethod.h" @@ -153,6 +154,10 @@ RescheduleMethod :: execute(XmlRpc::XmlRpcValue & rootParameter, } try { schedule->reschedule(entryId, playschedule); + + // tell the scheduler daemon to reload the scheduled events + Ptr::Ref scheduler = SchedulerDaemon::getInstance(); + scheduler->update(); } catch (std::invalid_argument &e) { XmlRpcTools::markError(errorId+5, e.what(), returnValue);