Bug #1902 ยป vdr-epgfixer-chan-does-not-exists-crash.patch
epgfixer/tools.c 2014-08-19 11:40:53.506863186 +0200 | ||
---|---|---|
cSchedules *schedules = (cSchedules *)cSchedules::Schedules(SchedulesLock);
|
||
Lock();
|
||
while (schedules && (e = list->First()) != NULL) {
|
||
cSchedule *schedule = (cSchedule *)schedules->GetSchedule(Channels.GetByChannelID(e->GetChannelID()), true);
|
||
if (schedule) {
|
||
schedule->AddEvent(e->GetEvent());
|
||
EpgHandlers.SortSchedule(schedule);
|
||
EpgHandlers.DropOutdated(schedule, e->GetEvent()->StartTime(), e->GetEvent()->EndTime(), e->GetEvent()->TableID(), e->GetEvent()->Version());
|
||
list->Del(e);
|
||
}
|
||
tChannelID chid = e->GetChannelID();
|
||
cChannel *chan = Channels.GetByChannelID(chid);
|
||
if (!chan) {
|
||
isyslog("Channel %s not found !", *chid.ToString());
|
||
} else {
|
||
|
||
cSchedule *schedule = (cSchedule *)schedules->GetSchedule(chan, true);
|
||
if (schedule) {
|
||
schedule->AddEvent(e->GetEvent());
|
||
EpgHandlers.SortSchedule(schedule);
|
||
EpgHandlers.DropOutdated(schedule, e->GetEvent()->StartTime(), e->GetEvent()->EndTime(), e->GetEvent()->TableID(), e->GetEvent()->Version());
|
||
}
|
||
}
|
||
list->Del(e);
|
||
}
|
||
Unlock();
|
||
cCondWait::SleepMs(10);
|
||
}
|