the EventScheduler (and thus PlaylistEvents) recieved a null sessionId,
making them fail on scheduled execution. fix for issues #809 and #831 see http://bugs.campware.org/view.php?id=809 and http://bugs.campware.org/view.php?id=831
This commit is contained in:
parent
9848eefbe7
commit
84cd995e69
1 changed files with 23 additions and 17 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.26 $
|
||||
Version : $Revision: 1.27 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/scheduler/src/SchedulerDaemon.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -266,20 +266,6 @@ SchedulerDaemon :: configure(const xmlpp::Element & element)
|
|||
audioPlayer = apf->getAudioPlayer();
|
||||
playLog = plf->getPlayLog();
|
||||
schedule = sf->getSchedule();
|
||||
|
||||
Ptr<PlaylistEventContainer>::Ref eventContainer;
|
||||
Ptr<time_duration>::Ref granularity;
|
||||
eventContainer.reset(new PlaylistEventContainer(sessionId,
|
||||
storage,
|
||||
schedule,
|
||||
audioPlayer,
|
||||
playLog));
|
||||
// TODO: read granularity from config file
|
||||
granularity.reset(new time_duration(seconds(1)));
|
||||
|
||||
eventScheduler.reset(
|
||||
new LiveSupport::EventScheduler::EventScheduler(eventContainer,
|
||||
granularity));
|
||||
}
|
||||
|
||||
|
||||
|
@ -402,7 +388,23 @@ SchedulerDaemon :: startup (void) throw ()
|
|||
// TODO: mark error
|
||||
std::cerr << "Helix initialization problem: " << e.what() << std::endl;
|
||||
}
|
||||
if (!eventScheduler.get()) {
|
||||
Ptr<PlaylistEventContainer>::Ref eventContainer;
|
||||
Ptr<time_duration>::Ref granularity;
|
||||
eventContainer.reset(new PlaylistEventContainer(sessionId,
|
||||
storage,
|
||||
schedule,
|
||||
audioPlayer,
|
||||
playLog));
|
||||
// TODO: read granularity from config file
|
||||
granularity.reset(new time_duration(seconds(1)));
|
||||
|
||||
eventScheduler.reset(
|
||||
new LiveSupport::EventScheduler::EventScheduler(eventContainer,
|
||||
granularity));
|
||||
}
|
||||
eventScheduler->start();
|
||||
|
||||
XmlRpcDaemon::startup();
|
||||
}
|
||||
|
||||
|
@ -413,7 +415,9 @@ SchedulerDaemon :: startup (void) throw ()
|
|||
void
|
||||
SchedulerDaemon :: shutdown(void) throw (std::logic_error)
|
||||
{
|
||||
eventScheduler->stop();
|
||||
if (eventScheduler.get()) {
|
||||
eventScheduler->stop();
|
||||
}
|
||||
audioPlayer->deInitialize();
|
||||
|
||||
XmlRpcDaemon::shutdown();
|
||||
|
@ -427,6 +431,8 @@ void
|
|||
SchedulerDaemon :: update (void) throw (std::logic_error)
|
||||
{
|
||||
// TODO: check if we've been configured
|
||||
eventScheduler->update();
|
||||
if (eventScheduler.get()) {
|
||||
eventScheduler->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue