diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2007-06-01 18:46:02 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2007-06-01 18:46:02 +0000 |
commit | a28bc78bf56afc4e8d39aac72026289b97559629 (patch) | |
tree | e5f03dbdd4431e04f187c29de312553c3d413a84 /media-plugins | |
parent | Specify --infodir for configure. (diff) | |
download | gentoo-2-a28bc78bf56afc4e8d39aac72026289b97559629.tar.gz gentoo-2-a28bc78bf56afc4e8d39aac72026289b97559629.tar.bz2 gentoo-2-a28bc78bf56afc4e8d39aac72026289b97559629.zip |
Added patch against deleting active timers crashing vdr.
(Portage version: 2.1.2.9)
Diffstat (limited to 'media-plugins')
-rw-r--r-- | media-plugins/vdr-live/ChangeLog | 8 | ||||
-rw-r--r-- | media-plugins/vdr-live/files/0.1.0/series | 1 | ||||
-rw-r--r-- | media-plugins/vdr-live/files/0.1.0/timerdelete.diff | 162 | ||||
-rw-r--r-- | media-plugins/vdr-live/files/digest-vdr-live-0.1.0-r1 | 3 | ||||
-rw-r--r-- | media-plugins/vdr-live/vdr-live-0.1.0-r1.ebuild | 23 |
5 files changed, 196 insertions, 1 deletions
diff --git a/media-plugins/vdr-live/ChangeLog b/media-plugins/vdr-live/ChangeLog index 528557c3ed80..e6458297544a 100644 --- a/media-plugins/vdr-live/ChangeLog +++ b/media-plugins/vdr-live/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-plugins/vdr-live # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-live/ChangeLog,v 1.3 2007/05/29 16:07:04 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-live/ChangeLog,v 1.4 2007/06/01 18:46:02 zzam Exp $ + +*vdr-live-0.1.0-r1 (01 Jun 2007) + + 01 Jun 2007; Matthias Schwarzott <zzam@gentoo.org> files/0.1.0/series, + +files/0.1.0/timerdelete.diff, +vdr-live-0.1.0-r1.ebuild: + Added patch against deleting active timers crashing vdr. 29 May 2007; Matthias Schwarzott <zzam@gentoo.org> files/0.1.0/linking.diff, vdr-live-0.1.0.ebuild: diff --git a/media-plugins/vdr-live/files/0.1.0/series b/media-plugins/vdr-live/files/0.1.0/series index e34801cadaed..8da524b6ac13 100644 --- a/media-plugins/vdr-live/files/0.1.0/series +++ b/media-plugins/vdr-live/files/0.1.0/series @@ -1,2 +1,3 @@ new-tntnet.diff linking.diff +timerdelete.diff diff --git a/media-plugins/vdr-live/files/0.1.0/timerdelete.diff b/media-plugins/vdr-live/files/0.1.0/timerdelete.diff new file mode 100644 index 000000000000..014c8437cd04 --- /dev/null +++ b/media-plugins/vdr-live/files/0.1.0/timerdelete.diff @@ -0,0 +1,162 @@ +Index: live-0.1.0/timers.cpp +=================================================================== +--- live-0.1.0.orig/timers.cpp ++++ live-0.1.0/timers.cpp +@@ -15,6 +15,9 @@ namespace vdrlive { + using namespace std; + using namespace vdrlive; + ++static char const* const TIMER_DELETE = "DELETE"; ++static char const* const TIMER_TOGGLE = "TOGGLE"; ++ + SortedTimers::SortedTimers(): + m_state( 0 ) + { +@@ -79,6 +82,8 @@ TimerManager::TimerManager() + void TimerManager::UpdateTimer( cTimer* timer, int flags, tChannelID& channel, string const& weekdays, string const& day, + int start, int stop, int priority, int lifetime, string const& title, string const& aux ) + { ++ cMutexLock lock( this ); ++ + ostringstream builder; + builder << flags << ":" << channel << ":" << ( weekdays != "-------" ? weekdays : "" ) + << ( weekdays == "-------" || day.empty() ? "" : "@" ) << day << ":" << start << ":" << stop << ":" +@@ -98,22 +103,33 @@ void TimerManager::UpdateTimer( cTimer* + throw HtmlError( error ); + } + +-void TimerManager::DelTimer( cTimer* timer) ++void TimerManager::DelTimer( cTimer* timer ) + { +- cTimer* delTimer = Timers.GetTimer(timer); +- Timers.Del(delTimer, true); +- Timers.SetModified(); +- m_timers.ReloadTimers(false); ++ cMutexLock lock( this ); ++ ++ TimerPair timerData( timer, TIMER_DELETE ); ++ ++ m_updateTimers.push_back( timerData ); ++ m_updateWait.Wait( *this ); ++ ++ string error = GetError( timerData ); ++ if ( !error.empty() ) ++ throw HtmlError( error ); + } + + void TimerManager::ToggleTimerActive( cTimer* timer) + { +- cTimer* toggleTimer = Timers.GetTimer(timer); +- toggleTimer->OnOff(); +- Timers.SetModified(); +- m_timers.ReloadTimers(false); +-} ++ cMutexLock lock( this ); ++ ++ TimerPair timerData( timer, TIMER_TOGGLE ); ++ ++ m_updateTimers.push_back( timerData ); ++ m_updateWait.Wait( *this ); + ++ string error = GetError( timerData ); ++ if ( !error.empty() ) ++ throw HtmlError( error ); ++} + + void TimerManager::DoPendingWork() + { +@@ -123,10 +139,10 @@ void TimerManager::DoPendingWork() + cMutexLock lock( this ); + if ( m_updateTimers.size() > 0 ) { + DoUpdateTimers(); +- dsyslog("SV: signalling waiters"); +- m_updateWait.Broadcast(); + } + DoReloadTimers(); ++ dsyslog("SV: signalling waiters"); ++ m_updateWait.Broadcast(); + } + + void TimerManager::DoUpdateTimers() +@@ -135,8 +151,10 @@ void TimerManager::DoUpdateTimers() + for ( TimerList::iterator timer = m_updateTimers.begin(); timer != m_updateTimers.end(); ++timer ) { + if ( timer->first == 0 ) // new timer + DoInsertTimer( *timer ); +- else if ( timer->second == "" ) // delete timer +- ; // XXX ++ else if ( timer->second == TIMER_DELETE ) // delete timer ++ DoDeleteTimer( *timer ); ++ else if ( timer->second == TIMER_TOGGLE ) // toggle timer ++ DoToggleTimer( *timer ); + else // update timer + DoUpdateTimer( *timer ); + } +@@ -187,6 +205,47 @@ void TimerManager::DoUpdateTimer( TimerP + isyslog("live timer %s modified (%s)", *oldTimer->ToDescr(), oldTimer->HasFlags(tfActive) ? "active" : "inactive"); + } + ++void TimerManager::DoDeleteTimer( TimerPair& timerData ) ++{ ++ if ( Timers.BeingEdited() ) { ++ StoreError( timerData, tr("Timers are being edited - try again later") ); ++ return; ++ } ++ ++ cTimer* oldTimer = Timers.GetTimer( timerData.first ); ++ if ( oldTimer == 0 ) { ++ StoreError( timerData, tr("Timer not defined") ); ++ return; ++ } ++ ++ cTimer copy = *oldTimer; ++ if ( oldTimer->Recording() ) { ++ oldTimer->Skip(); ++ cRecordControls::Process( time( 0 ) ); ++ } ++ Timers.Del( oldTimer ); ++ Timers.SetModified(); ++ isyslog("live timer %s deleted", *copy.ToDescr()); ++} ++ ++void TimerManager::DoToggleTimer( TimerPair& timerData ) ++{ ++ if ( Timers.BeingEdited() ) { ++ StoreError( timerData, tr("Timers are being edited - try again later") ); ++ return; ++ } ++ ++ cTimer* toggleTimer = Timers.GetTimer( timerData.first ); ++ if ( toggleTimer == 0 ) { ++ StoreError( timerData, tr("Timer not defined") ); ++ return; ++ } ++ ++ toggleTimer->OnOff(); ++ Timers.SetModified(); ++ isyslog("live timer %s toggled %s", *toggleTimer->ToDescr(), toggleTimer->HasFlags(tfActive) ? "on" : "off"); ++} ++ + void TimerManager::StoreError( TimerPair const& timerData, std::string const& error ) + { + m_failedUpdates.push_back( ErrorPair( timerData, error ) ); +Index: live-0.1.0/timers.h +=================================================================== +--- live-0.1.0.orig/timers.h ++++ live-0.1.0/timers.h +@@ -4,6 +4,7 @@ + #include <list> + #include <string> + #include <vdr/channels.h> ++#include <vdr/menu.h> + #include <vdr/timers.h> + #include <vdr/thread.h> + #include "live.h" +@@ -63,6 +64,8 @@ private: + void DoUpdateTimers(); + void DoInsertTimer( TimerPair& timerData ); + void DoUpdateTimer( TimerPair& timerData ); ++ void DoDeleteTimer( TimerPair& timerData ); ++ void DoToggleTimer( TimerPair& timerData ); + + void StoreError( TimerPair const& timerData, std::string const& error ); + std::string GetError( TimerPair const& timerData ); diff --git a/media-plugins/vdr-live/files/digest-vdr-live-0.1.0-r1 b/media-plugins/vdr-live/files/digest-vdr-live-0.1.0-r1 new file mode 100644 index 000000000000..b45dedfd40f4 --- /dev/null +++ b/media-plugins/vdr-live/files/digest-vdr-live-0.1.0-r1 @@ -0,0 +1,3 @@ +MD5 bf6070e8839180239b0f983c71ec1128 vdr-live-0.1.0.tar.gz 268899 +RMD160 303cd0b95520d20c70931fa546533962dd624634 vdr-live-0.1.0.tar.gz 268899 +SHA256 6d8467434e47b1127e7dc61a56f67011cf14cc348036591ef10e2069009d6dc2 vdr-live-0.1.0.tar.gz 268899 diff --git a/media-plugins/vdr-live/vdr-live-0.1.0-r1.ebuild b/media-plugins/vdr-live/vdr-live-0.1.0-r1.ebuild new file mode 100644 index 000000000000..0d1dffd54d0a --- /dev/null +++ b/media-plugins/vdr-live/vdr-live-0.1.0-r1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-live/vdr-live-0.1.0-r1.ebuild,v 1.1 2007/06/01 18:46:02 zzam Exp $ + +inherit vdr-plugin + +DESCRIPTION="VDR Plugin: Web Access To Settings" +HOMEPAGE="http://live.vdr-developer.org" +SRC_URI="http://live.vdr-developer.org/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +DEPEND="media-video/vdr + >=dev-libs/boost-1.33.0 + >=dev-libs/tntnet-1.5.3 + >=dev-libs/cxxtools-1.4.3" + +PATCHES="${FILESDIR}/${PV}/new-tntnet.diff + ${FILESDIR}/${PV}/linking.diff + ${FILESDIR}/${PV}/timerdelete.diff" |