Project

General

Profile

Bug #2411 ยป 0001-Fix-compiling-against-VDR-2.3.1.patch

glenvt.18, 05/28/2016 02:43 AM

View differences:

epgclone.c
Dest->SetSeen();
tChannelID channelID;
if (dest_num) {
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
const cChannel *dest_chan = Channels->GetByNumber(dest_num);
if (dest_chan)
channelID = Channels->GetByNumber(dest_num)->GetChannelID();
#else
cChannel *dest_chan = Channels.GetByNumber(dest_num);
if (dest_chan)
channelID = Channels.GetByNumber(dest_num)->GetChannelID();
#endif
else
channelID = tChannelID::InvalidID;
}
setup_menu.c
break;
case kBlue:
Skins.Message(mtInfo, tr("Clearing EPG data..."));
#if VDRVERSNUM >= 20301
{
LOCK_TIMERS_WRITE;
LOCK_SCHEDULES_WRITE;
for (cTimer *Timer = Timers->First(); Timer; Timer = Timers->Next(Timer))
Timer->SetEvent(NULL);
for (cSchedule *Schedule = Schedules->First(); Schedule; Schedule = Schedules->Next(Schedule))
Schedule->Cleanup(INT_MAX);
}
cEitFilter::SetDisableUntil(time(NULL) + 10);
#else
cEitFilter::SetDisableUntil(time(NULL) + 10);
if (cSchedules::ClearAll())
cEitFilter::SetDisableUntil(time(NULL) + 10);
#endif
Skins.Message(mtInfo, NULL);
state = osContinue;
break;
tools.c
void cAddEventThread::Action(void)
{
SetPriority(19);
while (Running() && !LastHandleEvent.TimedOut()) {
for (; Running() && !LastHandleEvent.TimedOut(); cCondWait::SleepMs(10)) {
if (list->First() == NULL)
continue;
cAddEventListItem *e = NULL;
#if VDRVERSNUM >= 20301
cStateKey StateKey;
cSchedules *schedules = cSchedules::GetSchedulesWrite(StateKey, 10);
LOCK_CHANNELS_READ;
#else
cSchedulesLock SchedulesLock(true, 10);
cSchedules *schedules = (cSchedules *)cSchedules::Schedules(SchedulesLock);
#endif
Lock();
while (schedules && (e = list->First()) != NULL) {
tChannelID chanid = e->GetChannelID();
#if VDRVERSNUM >= 20301
const cChannel *chan = Channels->GetByChannelID(chanid);
#else
cChannel *chan = Channels.GetByChannelID(chanid);
#endif
if (!chan) {
error("Destination channel %s not found for cloning!", *chanid.ToString());
}
......
list->Del(e);
}
Unlock();
cCondWait::SleepMs(10);
#if VDRVERSNUM >= 20301
if (schedules)
StateKey.Remove();
#endif
}
}
......
bool active = false;
if (numchannels > 0) {
int i = 0;
#if VDRVERSNUM >= 20301
LOCK_CHANNELS_READ;
int channel_number = Channels->GetByChannelID(ChannelID)->Number();
#else
int channel_number = Channels.GetByChannelID(ChannelID)->Number();
#endif
while (i < numchannels) {
if ((channel_number == GetChannelNum(i)) ||
(GetChannelID(i) && (ChannelID == *GetChannelID(i)))) {
    (1-1/1)