diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/provider/recProvider/recProvider.cpp | 8 | ||||
-rw-r--r-- | plugins/provider/vdrProvider/vdrProvider.cpp | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/plugins/provider/recProvider/recProvider.cpp b/plugins/provider/recProvider/recProvider.cpp index 41ca849..8657cb3 100644 --- a/plugins/provider/recProvider/recProvider.cpp +++ b/plugins/provider/recProvider/recProvider.cpp @@ -80,6 +80,8 @@ private: return OpenFile(1); } + cCondWait sleep; + public: RecProvider() @@ -92,7 +94,8 @@ public: } virtual ~RecProvider(){ - Cancel(2); + sleep.Signal(); + Cancel(5); } virtual string ProvidesSchema(){ return "rec"; } @@ -256,6 +259,7 @@ public: int state = 0; time_t now; bool update = false; + while(Running()){ update = false; @@ -276,7 +280,7 @@ public: if(update){ OnContainerUpdate(GetRootContainer(), GetContainerUpdateId(GetRootContainer())); } - sleep(10); + sleep.Wait(10000); } } diff --git a/plugins/provider/vdrProvider/vdrProvider.cpp b/plugins/provider/vdrProvider/vdrProvider.cpp index 6b4c1b1..f54f4e7 100644 --- a/plugins/provider/vdrProvider/vdrProvider.cpp +++ b/plugins/provider/vdrProvider/vdrProvider.cpp @@ -53,6 +53,8 @@ private: return uri.substr(6,uri.size()-7); } + cCondWait sleep; + public: VdrProvider() @@ -64,7 +66,8 @@ public: } virtual ~VdrProvider(){ - Cancel(2); + sleep.Signal(); + Cancel(5); } virtual string ProvidesSchema(){ return "vdr"; } @@ -207,7 +210,7 @@ public: lastModified = now; } - sleep(2); + sleep.Wait(2000); } } |