summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2012-06-01 01:17:44 +0200
committerDimitar Petrovski <dimeptr@gmail.com>2012-06-01 01:17:44 +0200
commit15fee6896cb3cc24c0ae14106efdbc328a07ff79 (patch)
treed65b49dfe77313a0a4520b10956bf6babaca98bf
parent80c9c7fa84f17dbe2779c2a27dac82a001e33101 (diff)
downloadvdr-plugin-eepg-15fee6896cb3cc24c0ae14106efdbc328a07ff79.tar.gz
vdr-plugin-eepg-15fee6896cb3cc24c0ae14106efdbc328a07ff79.tar.bz2
fix compile, but can not lock schedule
-rw-r--r--epghandler.c14
-rw-r--r--util.c7
-rw-r--r--util.h10
3 files changed, 22 insertions, 9 deletions
diff --git a/epghandler.c b/epghandler.c
index 426958d..64bb208 100644
--- a/epghandler.c
+++ b/epghandler.c
@@ -112,12 +112,15 @@ bool cEEpgHandler::HandleEvent(cEvent* Event) {
Event->SetDescription(origDescription.c_str());
}
- cSchedulesLock SchedulesLock (true);
+ if (equivHandler->getEquiChanMap().count(*Event->ChannelID().ToString()) <= 0)
+ return true;
+
+ cSchedulesLock SchedulesLock (false);
cSchedules *s = (cSchedules *) cSchedules::Schedules (SchedulesLock);
if (s) {
equivHandler->updateEquivalent(s, Event->ChannelID(), Event);
} else
- LogE (0, prep("Error: could not lock schedules."));
+ LogD (0, prep("Error: could not lock schedules."));
//TODO just to see the difference
//else if (!origDescription.empty() && !origDescription.compare(Event->Description())) {
@@ -133,12 +136,15 @@ bool cEEpgHandler::SortSchedule(cSchedule* Schedule) {
Schedule->Sort();
- cSchedulesLock SchedulesLock (true);
+ if (equivHandler->getEquiChanMap().count(*Schedule->ChannelID().ToString()) <= 0)
+ return true;
+
+ cSchedulesLock SchedulesLock (false);
cSchedules *s = (cSchedules *) cSchedules::Schedules (SchedulesLock);
if (s) {
equivHandler->sortEquivalents(Schedule->ChannelID(), s);
} else
- LogE (0, prep("Error: could not lock schedules."));
+ LogD (0, prep("Error: could not lock schedules."));
return true;
}
diff --git a/util.c b/util.c
index b60547d..069753f 100644
--- a/util.c
+++ b/util.c
@@ -10,6 +10,13 @@
namespace util
{
+int AvailableSources[32];
+int NumberOfAvailableSources = 0;
+
+int Yesterday;
+int YesterdayEpoch;
+int YesterdayEpochUTC;
+
cChannel *GetChannelByID(tChannelID & channelID, bool searchOtherPos)
{
cChannel *VC = Channels.GetByChannelID(channelID, true);
diff --git a/util.h b/util.h
index 8c12184..a32bce2 100644
--- a/util.h
+++ b/util.h
@@ -13,12 +13,12 @@ struct tChannelID;
namespace util
{
-int AvailableSources[32];
-int NumberOfAvailableSources = 0;
+extern int AvailableSources[32];
+extern int NumberOfAvailableSources;
-int Yesterday;
-int YesterdayEpoch;
-int YesterdayEpochUTC;
+extern int Yesterday;
+extern int YesterdayEpoch;
+extern int YesterdayEpochUTC;
cChannel *GetChannelByID(tChannelID & channelID, bool searchOtherPos);
time_t LocalTime2UTC (time_t t);