diff options
author | Jochen Dolze <vdr@dolze.de> | 2012-06-25 21:17:37 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2012-06-25 21:17:37 +0200 |
commit | 7e4be58b957cac92e5fbb345fc919012b4cb9d32 (patch) | |
tree | 1f6f7147509d5ebf0c863e81db3de98b341ce824 /import.cpp | |
parent | 2688f79af07c3c833d6c49f0e174d7e966660dd2 (diff) | |
download | vdr-plugin-xmltv2vdr-7e4be58b957cac92e5fbb345fc919012b4cb9d32.tar.gz vdr-plugin-xmltv2vdr-7e4be58b957cac92e5fbb345fc919012b4cb9d32.tar.bz2 |
Removed cSchedulesLock from cParse::Process (not needed)
Prevent Timers.DeleteExpired() while in cImport::Process
Added support for epgsearch-enablesearchtimers-v1.0 service
Diffstat (limited to 'import.cpp')
-rw-r--r-- | import.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1434,6 +1434,8 @@ int cImport::Process(cEPGSource *Source, cEPGExecutor &myExecutor) time_t endoneday=begin+86400; #endif + Timers.IncBeingEdited(); // prevent Timers.DeleteExpired() to execute + cSchedulesLock *schedulesLock=NULL; const cSchedules *schedules=NULL; @@ -1446,6 +1448,7 @@ int cImport::Process(cEPGSource *Source, cEPGExecutor &myExecutor) if (!myExecutor.StillRunning()) { delete schedulesLock; + Timers.DecBeingEdited(); isyslogs(Source,"request to stop from vdr"); return 0; } @@ -1459,6 +1462,7 @@ int cImport::Process(cEPGSource *Source, cEPGExecutor &myExecutor) { esyslogs(Source,"failed to open %s",g->EPGFile()); delete schedulesLock; + Timers.DecBeingEdited(); return 141; } @@ -1472,6 +1476,7 @@ int cImport::Process(cEPGSource *Source, cEPGExecutor &myExecutor) sqlite3_close(db); esyslogs(Source,"out of memory"); delete schedulesLock; + Timers.DecBeingEdited(); return 134; } @@ -1483,6 +1488,7 @@ int cImport::Process(cEPGSource *Source, cEPGExecutor &myExecutor) sqlite3_close(db); free(sql); delete schedulesLock; + Timers.DecBeingEdited(); return 141; } free(sql); @@ -1581,7 +1587,11 @@ int cImport::Process(cEPGSource *Source, cEPGExecutor &myExecutor) #if VDRVERSNUM < 10726 && (!EPGHANDLER) if ((!addevents) && (xevent.StartTime()>endoneday)) continue; #endif - if (PutEvent(Source, db, schedule, event, &xevent, flags)) cnt++; + if (PutEvent(Source, db, schedule, event, &xevent, flags)) + { + schedules->SetModified(schedule); + cnt++; + } } } else @@ -1619,6 +1629,8 @@ int cImport::Process(cEPGSource *Source, cEPGExecutor &myExecutor) sqlite3_finalize(stmt); sqlite3_close(db); delete schedulesLock; + Timers.SetEvents(); + Timers.DecBeingEdited(); return 0; } |